I need certain users to edit django.contrib.auth.models.User
objects.
My first thought was to grant them the auth | User | Can change user
permission and flag them as is staff
, so they can log into the Django Admin site. The problem is though, that they can use that to make themselves super admins.
Since I want them to only be able to edit certain fields, I created a very limited view for that. What's left for me to do, is to actually grant permission on that view to that subset of users. The only solution I found was to still grant them the auth | User | Can change user
permission (without making them staff
).
My question is this:
If I use the @permission_required
decorator on that view in cooperation with the auth | User | Can change user
permission, is there any other way for the users to hack their way into granting themselves the super admin role (even assuming the user is a advanced Django programmer)? I am talking about things like e. g. API calls I am unaware of, or similar.
I want to take possible mistakes in my code out of the scope here.