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 244
    • Issues 244
    • 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
  • #2388

Closed
Open
Opened Nov 17, 2020 by Maxime Besson@maxbes🔧Maintainer

Allow custom SSL logos when using choice

Concerned version

Version: 2.0.9

Summary

I use SSL with the Choice module, but I want to customize the logo:

image

The only way to do it for now is to overwrite static/common/modules/SSL.png with my custom file.

But this is not very good for maintenance. On every update I have to replace the logo again. Using a rewriterule can mitigate this but not very elegantly.

Possible fixes

When building $authLoop, I noticed the following code:

                # If displayType is logo, check if key.png is available
                if (  -e $self->conf->{templateDir}
                    . "/../htdocs/static/common/modules/"
                    . $logo
                    . ".png" )
                {
                    $optionsLoop->{logoFile} = $logo . ".png";
                }
                else {
                    $optionsLoop->{logoFile} = $auth . ".png";
                }

So, if my "SSL" choice is registered as 1_Smartcard in the config, LLNG searches for 1_Smartcard.png....

and indeed it is found :

          {
            'module' => 'SSL',
            'sslform' => 1,
            'url' => '#',
            'logoFile' => '1_Smartcard.png',
            'name' => ' Smartcard',
            'key' => '1_Smartcard'
          },

... but sslChoice.tpl does not use it :(

  <input type="hidden" name="nossl" value="1" />
  <div class="sslclick">
    <img src="<TMPL_VAR NAME="STATIC_PREFIX">common/modules/SSL.png" alt="<TMPL_VAR NAME="module">" class="img-thumbnail mb-3" />
  </div>

I will fix this template to use logoFile if available. But I think we should also work on a system that allows skins to package their own module logos

Edited Dec 21, 2020 by Maxime Besson
Assignee
Assign to
2.0.10
Milestone
2.0.10 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: lemonldap-ng/lemonldap-ng#2388