Skip to content

Made DJANGO_DEFAULT_AUTH_GROUPS configurable via environment #6

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ def add_ssh_keys():

# Django Auth
DJANGO_AUTH_TYPE = 'BASIC'
DJANGO_AUTH_DEFAULT_GROUPS = []
env_default_groups = os.get.env('DJANGO_AUTH_DEFAULT_GROUPS')
Copy link

Choose a reason for hiding this comment

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

env_default_groups = os.getenv('DJANGO_AUTH_DEFAULT_GROUPS')

if env_default_groups:
DJANGO_AUTH_DEFAULT_GROUPS = env_default_groups.split(',')
else:
DJANGO_AUTH_DEFAULT_GROUPS = [ ]
LOGIN_URL = 'rest_login'
LOGIN_REDIRECT_URL = '/'

Expand Down