Compare commits

...

2 commits

Author SHA1 Message Date
5b68e2edbe Update https://github.com/ansible/ansible-lint action to v26
All checks were successful
/ Ansible Lint (push) Successful in 2m25s
/ Ansible Lint (pull_request) Successful in 2m22s
2026-01-13 01:30:44 +00:00
951ec7ebcd
netbox(role): fix oidc integration by no longer using is_staff
Some checks failed
/ Ansible Lint (push) Failing after 1m56s
is_staff got removed in 4.5.0.
See: https://github.com/netbox-community/netbox/releases/tag/v4.5.0
2026-01-13 02:25:06 +01:00
2 changed files with 1 additions and 3 deletions

View file

@ -24,7 +24,7 @@ jobs:
# work in our environmnet.
# Rather manually setup python (pip) before instead.
- name: Run ansible-lint
uses: https://github.com/ansible/ansible-lint@v25.12.2
uses: https://github.com/ansible/ansible-lint@v26.1.0
with:
setup_python: "false"
requirements_file: "requirements.yml"

View file

@ -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()