Compare commits
2 commits
7cfa72e2d9
...
e9cc3f9006
| Author | SHA1 | Date | |
|---|---|---|---|
| e9cc3f9006 | |||
|
951ec7ebcd |
2 changed files with 1 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
image: docker.io/library/mariadb:11
|
image: docker.io/library/mariadb:12
|
||||||
environment:
|
environment:
|
||||||
- "MARIADB_DATABASE=wordpress"
|
- "MARIADB_DATABASE=wordpress"
|
||||||
- "MARIADB_ROOT_PASSWORD={{ secret__mariadb_root_password }}"
|
- "MARIADB_ROOT_PASSWORD={{ secret__mariadb_root_password }}"
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ def remove_groups(response, user, backend, *args, **kwargs):
|
||||||
def set_roles(response, user, backend, *args, **kwargs):
|
def set_roles(response, user, backend, *args, **kwargs):
|
||||||
# Remove Roles temporary
|
# Remove Roles temporary
|
||||||
user.is_superuser = False
|
user.is_superuser = False
|
||||||
user.is_staff = False
|
|
||||||
try:
|
try:
|
||||||
groups = response['groups']
|
groups = response['groups']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
@ -51,5 +50,4 @@ def set_roles(response, user, backend, *args, **kwargs):
|
||||||
|
|
||||||
# Set roles is role (superuser or staff) is in groups
|
# Set roles is role (superuser or staff) is in groups
|
||||||
user.is_superuser = True if 'superusers' in groups else False
|
user.is_superuser = True if 'superusers' in groups else False
|
||||||
user.is_staff = True if 'staff' in groups else False
|
|
||||||
user.save()
|
user.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue