Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O official-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Framasoft
  • PeerTube
  • official-plugins
  • Merge requests
  • !11

Merged
Created Mar 21, 2021 by Florent F@fflorentContributor0 of 3 tasks completed0/3 tasks

[auth-ldap] Define an index for the email attribute results

  • Overview 5
  • Commits 2
  • Changes 1

Use case

As an administrator, I take advantage of the OpenLDAP integrated in Yunohost (thanks to which I installed PeerTube).

I use the maildrop attribute to get the email which returns several entries.

I know that I want to use is the second entry of this attribute.

Proposed solution

I add the mail-property-index which, in case of several entries are returned, choose the entry by its array index.

Alternative ?

I have thought of some alternatives, which may be a little bit harder to implement but above all to understand by the user:

  • use regexp to select the right email property
  • a textarea in which the user may enter a JS function (not sure at all about how easy it would be to use for the user…)

TODO

  • We have to test the solution and get feedback. We will open the MR once we have successfully authenticated the user and fetched the right email from the Yunohost LDAP.
  • If the index is above the array length, log a warning.
  • A hint on how to use the index (explain that it is 0-based)

NB: the patch is small enough, feedback welcome at any time by anyone :).

Edited Mar 25, 2021 by Florent F
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: index-email-property