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

[fix] Admin actions require model permissions #873

Merged
merged 3 commits into from
Jul 1, 2024
Merged

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Jun 18, 2024

@coveralls
Copy link

Coverage Status

coverage: 98.752%. remained the same
when pulling 2f4ba1a on admin-action-perms
into 7aceba7 on master.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
def change_group(self, request, queryset):
# Validate all selected devices belong to the same organization
# which is managed by the user.
org_id = None
if queryset:
org_id = queryset[0].organization_id
if not request.user.is_superuser and request.user.is_manager(org_id):
if not request.user.is_superuser and not request.user.is_manager(org_id):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

@nemesifier nemesifier merged commit efb6cdd into master Jul 1, 2024
10 checks passed
@nemesifier nemesifier deleted the admin-action-perms branch July 1, 2024 19:48
@coveralls
Copy link

Coverage Status

coverage: 98.752%. remained the same
when pulling 997f936 on admin-action-perms
into 7aceba7 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants