Skip to content
Snippets Groups Projects
Commit c3042a52 authored by Art's avatar Art :lizard:
Browse files

Remove redundant su+staff permissions, now groups are used directly

parent aee7c4e1
Branches
No related tags found
No related merge requests found
...@@ -51,9 +51,7 @@ SP_METADATA_LIFETIME_DAYS = 365 * 20 ...@@ -51,9 +51,7 @@ SP_METADATA_LIFETIME_DAYS = 365 * 20
PROJECT_NAME = os.environ.get('DJANGO_SETTINGS_MODULE').split('.')[0] PROJECT_NAME = os.environ.get('DJANGO_SETTINGS_MODULE').split('.')[0]
SU_GROUP_NAME = "{0}_superusers".format(PROJECT_NAME) SU_GROUP_NAME = "{0}_superusers".format(PROJECT_NAME)
SU_PERM_NAME = "superuser"
STAFF_GROUP_NAME = "{0}_staff".format(PROJECT_NAME) STAFF_GROUP_NAME = "{0}_staff".format(PROJECT_NAME)
STAFF_PERM_NAME = "staff"
PRETEND_AUTH_BACKEND = django_settings.AUTHENTICATION_BACKENDS[0] # pretend to be this backend; django does not expect that it is possible to log in without an authentication backend PRETEND_AUTH_BACKEND = django_settings.AUTHENTICATION_BACKENDS[0] # pretend to be this backend; django does not expect that it is possible to log in without an authentication backend
......
...@@ -13,8 +13,8 @@ class Command(BaseCommand): ...@@ -13,8 +13,8 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
try: try:
self.ensure_group_exists(app_settings.SU_GROUP_NAME, [app_settings.SU_PERM_NAME]) self.ensure_group_exists(app_settings.SU_GROUP_NAME)
self.ensure_group_exists(app_settings.STAFF_GROUP_NAME, [app_settings.STAFF_PERM_NAME]) self.ensure_group_exists(app_settings.STAFF_GROUP_NAME)
except Exception as e: except Exception as e:
raise CommandError("Could not ensure that compatibility groups and permissions exist. {0}".format(str(e))) raise CommandError("Could not ensure that compatibility groups and permissions exist. {0}".format(str(e)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment