Skip to content

15582 check permissions on specific object when sync request #15704

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 3 commits into from
Apr 17, 2024

Conversation

arthanson
Copy link
Collaborator

Fixes: #15582

Check permissions on specific object when sync request. I kept the original permission check as that is before the object is loaded and the get_object_or_404 can return 404 if the object doesn't exist and the user doesn't have sync permission which is a security edge case of showing which ones exist.

Once the object is actually loaded it needs to be re-checked in case there are constraints or perms tied to the specific object.

@arthanson arthanson marked this pull request as ready for review April 11, 2024 18:14
@arthanson arthanson requested a review from jeremystretch April 11, 2024 18:14
@arthanson arthanson requested a review from jeremystretch April 16, 2024 14:44
@jeremystretch jeremystretch merged commit b8cedfc into develop Apr 17, 2024
@jeremystretch jeremystretch deleted the 15582-sync-perm branch April 17, 2024 14:09
JCWasmx86 pushed a commit to JCWasmx86/netbox that referenced this pull request Apr 23, 2024
…community#15704)

* 15582 check permissions on specific object when sync request

* 15582 move permission check

* Enable translation of error message

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission constraint doesn't work on sync action
2 participants