Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • lemonldap-ng lemonldap-ng
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 331
    • Issues 331
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Merge requests
  • !239

Merged
Created Dec 19, 2021 by Maxime Besson@maxbes🔧Maintainer

Rework Custom plugins

  • Overview 0
  • Commits 4
  • Pipelines 3
  • Changes 13

See #2675 (closed), #2676 (closed), #2677 (closed), #2678 (closed)

The first commit gets rid of the getDisplayType overloading, which was only used in the context of Choice. We now delegate getDisplayType entirely to the loaded plugin, which is probably saner.

Auth, UserDB, Password, Register and CertificateResetByEmail all do the same thing: load a custom module from a conf parameter and delegate everything to it. And yet their code was different. So I created a new class (Lib::CustomModule) to handle the common stuff and make the rest of the modules trivial.

The only change of behavior, in addition to fixing bugs, should be that $portal->loadedPlugins now only contains ::Auth::Custom and no longer the actual module. But I don't think this is a problem. The actual module instance can be reached with $portal->_authentication.

Please review and test with your use cases if you have one.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix-custom-2675