Repository navigation
Add default Authentication Switch - #5338
Conversation
|
Thanks for the PR! But this does not work well if admin sets authentication source via config file. So I think the better approach is to set a default authentication source ID, if not exist then use whatever the first authentication source found. |
|
@unknwon I added a default source radio each column to turn on the default source from the admin console. As far as authentication source with the config file, will it show in UI after application up? If not, we need to reconsider it, thanks for your feedback! |
Yes, they will show on the same list (in admin panel) as if you added a login source via Web UI. |
#2, Fix a bug in "Edit" panel.
| } | ||
|
|
||
| localLoginSources.UpdateLoginSource(source) | ||
|
|
There was a problem hiding this comment.
Should we also call ResetNonDefaultLoginSources here?
|
@unknwon I added back the memory flush because local authentication files need this update. Thanks for your review. |
|
Thanks for the work! Looks like in a good shape now. |
|
Thanks! |
The changes will add a default authentication switch so that user doesn't need select their authentication source every time on the login page. This will save engineers time and money.
For example, if this select action from dropdown list will cost 1s and Gogs has 1,000,000 users, it will then cost 11.6 days on switching different authentication method. If one second will cost developer 1 cent, it will then save $10,000 money!