Customize or hide the "Indico" provider button, but keep the functionality

Hi all

In our setup we use LDAP for all users but the indico admin. The admin is the only one that needs to use the indico local_identities provider.

We’re trying to customize the login page and the content of the strings in the provider selection buttons. As I understand looking at the code the button label is taken from some json containing the provider title, so tweaking it for the LDAP provider in indico.conf was odd but easy, I just named the provider title whatever I wanted (User) and used templates to change the “Login with” string to “Login as”.

In our setup we do not want to allow people to create local accounts, yet we need a local account for the administrator, so at least the administrator needs to be able to switch provider to indico’s own, but not all the other users. Ideally users should not even see the local provider button.

Can you give us suggestions how to implement that? I tried disabling LOCAL_IDENTITIES
in indico.conf but that prevents the admin to login – the default is always LDAP

I see two ways of doing this:

  1. Create a login link/url just for the admins, but as it looks now it’s an unnecessary amount of code required, too much javascript for my taste, but if you have suggestions it’s ok
  2. Change the “Indico” string in provider.title for the default indico provider to something like “Admins login” but I’d like some guidance on how and where to tweak that properly so that it doesn’t get lost at every update

Thanks in advance for your answers!

Hi all
I solved the issue myself by fiddling around with Jinja in the custom template.
I attach the resulting patch, maybe somebody will benefit of it. (1.1 KB)