mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 01:06:11 -06:00
Allow users to define the LOGIN_URL.
If you rely on a single SSO provider, it can be confusing for users to see the username/password login with the SSO provider below. By allowing the LOGIN_URL to be overwritten users can be redirect directly to the SSO provider.
This commit is contained in:
parent
d131d9b310
commit
3e13b8b4c4
@ -455,8 +455,11 @@ MESSAGE_TAGS = {
|
|||||||
messages.ERROR: 'danger',
|
messages.ERROR: 'danger',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Authentication URLs
|
# Authentication URLs, if the LOGIN_URL have not been defined in the configuration, default to '/{BASE_PATH}login/'
|
||||||
LOGIN_URL = f'/{BASE_PATH}login/'
|
# Typical usecase for defining the LOGIN_URL will be to redirect to a SSO provider.
|
||||||
|
if 'LOGIN_URL' not in vars():
|
||||||
|
LOGIN_URL = f'/{BASE_PATH}login/'
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
|
LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
Loading…
Reference in New Issue
Block a user