Non Staff User Unable to delete devices
I have a user configured with security configured as "Active" and "Superuser Status" but not "Staff Status".
When this user tries to delete a device they get an error: "You are authenticated as <username>, but are not authorized to access this page. Would you like to login to a different account?"
I have also tried to assign all user permissions without checking the "Staff Status"box and that still fails.
My goal is to have operational users accounts that can perform all of the functions but not access the Admin site.
Any suggestions?
Superusers have all permissions implicitly. Staff status merely controls access to the admin UI. How are you attempting to delete a device?
From the main page, Devices -> check box in front of desired device -> Press "Delete Selected" at bottom of page -> Check Confirm box and "Confirm" button.
Then Error msg comes up.
I'm not sure why by not having the "Staff Status" checked this error would come up. Like you said, "Superuser Status" should imply all permissions within the app.
Forgot to mention that I'm running 1.5.2.
The cause of this bug was a bit of old code that's no longer needed:
@method_decorator(staff_member_required)
def dispatch(self, *args, **kwargs):
return super(BulkDeleteView, self).dispatch(*args, **kwargs)
staff_member_required was used at some point in early development, prior to the introduction of PermissionRequiredMixin in Django 1.9, which all views now use.