Compare commits
2 commits
c260328248
...
92bbc4b618
| Author | SHA1 | Date | |
|---|---|---|---|
| 92bbc4b618 | |||
|
951ec7ebcd |
2 changed files with 1 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: Ansible Lint
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install pip
|
||||
run: |
|
||||
apt update
|
||||
|
|
|
|||
|
|
@ -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