Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add make default option for authmails #16221

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jandolejs
Copy link

@jandolejs jandolejs commented Dec 19, 2023

Adds possibility to make email as default option for login.

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #number

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

If there are multiple authentication sources that may have the is_default=true property, then it will be ambiguous for both the system and the administrators.
To prevent any ambiguity, the technical solution could be to replace the is_default field of glpi_authldaps table into a authentication_default_type config (could be Auth::DB_GLPI, Auth::MAIL, Auth::LDAP, ...) and a authentication_default_items_id config (would contains the ID of the AuthMail or AuthLDAP item). These configurations could be then changed in the /front/auth.settings.php page for instance.
@orthagh Would this be acceptable for you?

Anyway, this kind of change should target the main branch (to be included in GLPI 10.1.x), but you can still apply this patch on your GLPI instance.

@cedric-anne cedric-anne changed the base branch from 10.0/bugfixes to main December 19, 2023 10:38
@jandolejs
Copy link
Author

How about changing that field into item_order or item_priority so you can set order for each item? We use only 2 auths but sure there must be someone who uses way more

@jandolejs
Copy link
Author

jandolejs commented Dec 19, 2023

or use this as temporary fix untill its fixed properly since soneone fixes it :)

@cedric-anne
Copy link
Member

How about changing that field into item_order or item_priority so you can set order for each item? We use only 2 auths but sure there must be someone who uses way more

Handling authentication sources priority could also be a solution, but IMHO, it would require a new table (e.g. glpi_authpriorities) to store the priority of each authentication source in order to ensure that priorities are centralized and in order to be able to define a unicity key on the priority itself.

It may help to improve the authentication responsiveness for any GLPI instances that has many authentication sources but many of them rarely used, but would require much work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants