Skip to content

adjusts users and groups startup scripts to accomdate non-uniqueness #148

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

Merged
merged 1 commit into from
Jul 30, 2019
Merged

Conversation

LBegnaud
Copy link
Contributor

Permission codenames in django are not unique. This iterates through all permissions of a given name to add individually

closes #146

@cimnine
Copy link
Collaborator

cimnine commented Jul 29, 2019

Thank you for this PR!

Am I understanding this correctly?

  • This will not break the current initialisers.
  • This changes the behaviour to adding all permissions/groups to a user with the given name. So if there are two permissions with the same name, both are added.

@LBegnaud
Copy link
Contributor Author

That's correct. The issue is that permission codenames are not unique, so this change does a search for all permission codenames that match the yaml array, then adds each one. I tested with my install and it works. No change to original behavior as far as I know.

@cimnine cimnine merged commit b0287e3 into netbox-community:master Jul 30, 2019
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.

Permission Codenames Not Necessarily Unique
2 participants