There are 2 users in my Django Admin app: admin which is superauser
and editor which is staff
:
- admin can do everything,
- editor has pemissions on blog application to be able to manage blog posts, categories, tags, etc.
- editor has no pemission on auth application which means editor cannot manage users and permissions.
Now I would like to allow editor to be able to create new users with this restrictions:
-
editor can only manage users which are NOT
superadmin
orstaff
, -
editor cannot even see
superadmin
orstaff
users, - when creating new user, editor should be able to set only
active
setting in Permissions area (superuser
,staff
,user permissions
andgroups
should be either disabled or even better not shown).
How can I achieve this ?
One way would be to have 2 different User Admin pages:
- standard/default User Admin page for my
superadmin
users, - customized User Admin page for my
staff
users.
But I’m not sure if that is possible - when I tried to register different UserAdmin page I got errordjango.contrib.admin.sites.AlreadyRegistered: The model User is already registered with 'auth.UserAdmin'
.
So what would you suggest ?
Thank you!