Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O official-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • 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

Admin message

Les inscriptions sur Framagit sont temporairement fermées en raison d’une importante vague de spam. En cas d’extrême urgence, vous pouvez contacter le support sur https://contact.framasoft.org.

  • FramasoftFramasoft
  • PeerTubePeerTube
  • official-plugins
  • Merge requests
  • !11

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Florent requested to merge fflorent/official-plugins:index-email-property into master Mar 21, 2021
  • Overview 5
  • Commits 2
  • Pipelines 0
  • 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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: index-email-property