Merge pull request #1240 from tobiasge/login-required-default

Change LOGIN_REQUIRED default to 'True'
This commit is contained in:
Tobias Genannt 2024-05-21 14:55:43 +02:00 committed by GitHub
commit 94e242179a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -221,9 +221,9 @@ if 'GRAPHQL_ENABLED' in environ:
# authenticated to NetBox indefinitely.
LOGIN_PERSISTENCE = _environ_get_and_map('LOGIN_PERSISTENCE', 'False', _AS_BOOL)
# Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users
# are permitted to access most data in NetBox (excluding secrets) but not make any changes.
LOGIN_REQUIRED = _environ_get_and_map('LOGIN_REQUIRED', 'False', _AS_BOOL)
# When enabled, only authenticated users are permitted to access any part of NetBox.
# Disabling this will allow unauthenticated users to access most areas of NetBox (but not make any changes).
LOGIN_REQUIRED = _environ_get_and_map('LOGIN_REQUIRED', 'True', _AS_BOOL)
# The length of time (in seconds) for which a user will remain logged into the web UI before being prompted to
# re-authenticate. (Default: 1209600 [14 days])

View File

@ -4,3 +4,4 @@ LOGGING = {
}
DEFAULT_PERMISSIONS = {}
LOGIN_REQUIRED = False

View File

@ -84,7 +84,7 @@ test_netbox_web() {
--retry 5 \
--retry-delay 0 \
--retry-max-time 40 \
http://127.0.0.1:8000/
http://127.0.0.1:8000/login/
)
if [ "$RESP_CODE" == "200" ]; then
echo "Webservice running"