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 321
    • Issues 321
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • 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
  • Issues
  • #2678
Closed
Open
Created Dec 17, 2021 by Maxime Besson@maxbes🔧Maintainer

Auth::Custom getDisplayType is broken with choice

Concerned version

Version: 2.0.13

Summary

  • Configure a choice with Name = MyChoice, Auth=Null
  • Create MyChoice.png logo in static/common/
  • Logo is correctly displayed
  • Edit MyChoice with Auth=Custom and customAuth=Null
  • a form is displayed instead

Logs

getDisplayType in Auth::Custom tries to detect the logo, I'm not sure why. It should delegate this to the underlying module (or Choice) instead.

getDisplayType {

    # Warning : $self passed here is the Portal itself
    my ($self) = @_;

    my $logo = ( $self->{conf}->{customAuth} =~ /::(\w+)$/ )[0]; 

    if (  -e $self->{conf}->{templateDir}
        . "/../htdocs/static/common/modules/"
        . $logo
        . ".png" )
    {
        $self->logger->debug("CustomAuth $logo.png found");
        return "logo";
    }
    return "standardform";
}

Backends used

For any bug on configuration/sessions storage, give us details on backends

Possible fixes

  • Remove getDisplayType in Auth::Custom (why is it needed??)
  • Rework Lib/Choice.pm:
                my $displayType = eval {
                    "Lemonldap::NG::Portal::Auth::${auth}"
                      ->can('getDisplayType')->( $self, $req );
                } || 'logo';

to call the loaded module instance's getDisplayType instead

Assignee
Assign to
Time tracking