Compare commits
2 commits
7b0431ad6b
...
b735499553
| Author | SHA1 | Date | |
|---|---|---|---|
| b735499553 | |||
|
951ec7ebcd |
2 changed files with 1 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: docker.io/library/redis:7.4.7
|
||||
image: docker.io/library/redis:8.4.0
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ def remove_groups(response, user, backend, *args, **kwargs):
|
|||
def set_roles(response, user, backend, *args, **kwargs):
|
||||
# Remove Roles temporary
|
||||
user.is_superuser = False
|
||||
user.is_staff = False
|
||||
try:
|
||||
groups = response['groups']
|
||||
except KeyError:
|
||||
|
|
@ -51,5 +50,4 @@ def set_roles(response, user, backend, *args, **kwargs):
|
|||
|
||||
# Set roles is role (superuser or staff) is in groups
|
||||
user.is_superuser = True if 'superusers' in groups else False
|
||||
user.is_staff = True if 'staff' in groups else False
|
||||
user.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue