Fix permission issue for editing or deleting instances #151
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: servala/servala-portal#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "148-instance-edit-permissions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Alternative to #148 – does this resolve the problem observed? I followed the other PR in making it so that only org admins, not org members, can change instances.
Additionally, I added a rule that grants "admin dashboard" permissions to staff users. Up until now, staff users were able to see, edit and delete objects, but did not see any indication of this on the dashboard, which was empty.
4c0a656ed4
to5feabda513
@rixx Unfortunately, no. A regular user without any Django permissions (staff or superuser) cannot edit or delete a service instance. IMHO we should not rely on the Django permissions but on the role the user has in the Organization.
@tobru Hm, but that's what's meant to happen regardless – you can see that Django uses the django-rules permissions in
User.has_perm
by checking out this PR and comparing the look of the admin interface as a staff user.I found the bug, though – the problem was that the checks were originally tailored to the Organization model, and were not flexible enough to look up the organization when given an instance. Fixed this in
0bd895c
.Perfect, now it works as intended
Try to fix permissions issueto Fix permission issue for editing or deleting instances