Skip to content

Commit

Permalink
Make it impossible to change is_staff and is_superuser from the admin
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Dec 7, 2024
1 parent a84ef32 commit 12c3dc8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mesads/users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ class UserAdmin(BaseUserAdmin):
"admin_roles_link",
"ads_manager_request_link",
"notifications_link",
# We don't want the flags is_staff and is_superuser to be changed by
# mistake, so they are read-only. Only a technical administrator can
# change them.
"is_staff",
"is_superuser",
)

search_fields = (
Expand Down

0 comments on commit 12c3dc8

Please sign in to comment.