Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
lemonldap-ng
lemonldap-ng
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 245
    • Issues 245
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • LemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Issues
  • #2122

Closed
Open
Opened Mar 23, 2020 by Maxime Besson@maxbes🔧Maintainer

Add a plugin entrypoint between setsessioninfo and setmacros

Summary

Several of our users have a need to enhance the session with extra attributes (from an external LDAP, DB, etc), and sometimes using Combination isn't an option (because we're already in Choice or because no userDB module does exactly what we want).

In order to do that, we can create a plugin and populate session attributes in afterData

But usually, users want these plugin-provided attributes to be available earlier than afterData so they can use the new attributes for 2FA rules, macros...

The solution is to hook the plugin with:

use constant afterSub => {
    setSessionInfo => 'run',
};

But since this is a pretty common use case, perhaps we should have a first-class entrypoint for this ?

Design proposition

perhaps a beforeMacros or earlyData entrypoint that runs just after setSessionfo ?

Assignee
Assign to
3.0.0
Milestone
3.0.0
Assign milestone
Time tracking
None
Due date
None
Reference: lemonldap-ng/lemonldap-ng#2122