Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change "FLAGS_BY_GROUP" in backends.py to accept array of groups #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jlemire3
Copy link

This commit changes the logic of the "FLAGS_BY_GROUP" parameter such that it can accept an array of group names. This will allow multiple groups to be configured with the respective flag.

I'm not a Django or Netbox expert, and I'd consider myself more of a beginner for both. Please double check this work and verify if this makes sense on the grander scheme to implement. I wanted to set one SAML group so it only got "is_staff", and I wanted to set another SAML group so it got both "is_staff" and "is_superuser", but found the plugin would accept the array without crashing, but would only manage the flag for the first group in the array. While looking through the issue tracker for related questions, I found #77 so I decided to take this on myself and create a pull request.

This commit changes the logic of the "FLAGS_BY_GROUP" parameter such that it can accept an array of group names. This will allow multiple groups to be configured with the respective flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant