Made contact e-mail read-only for analysts. Updated title of User admin page to "User Profile"

This commit is contained in:
CocoByte 2024-06-25 11:26:04 -06:00
parent 3bff5d5deb
commit cc7f698ddf
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F

View file

@ -645,7 +645,7 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
None, None,
{"fields": ("username", "password", "status", "verification_type")}, {"fields": ("username", "password", "status", "verification_type")},
), ),
("Personal info", {"fields": ("first_name", "middle_name", "last_name", "title", "email", "phone")}), ("User Profile", {"fields": ("first_name", "middle_name", "last_name", "title", "email", "phone")}),
( (
"Permissions", "Permissions",
{ {
@ -711,7 +711,7 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
"groups", "groups",
"Important dates", "Important dates",
"last_login", "last_login",
"date_joined", "date_joined"
] ]
list_filter = ( list_filter = (
@ -937,6 +937,7 @@ class ContactAdmin(ListHeaderAdmin, ImportExportModelAdmin):
# Read only that we'll leverage for CISA Analysts # Read only that we'll leverage for CISA Analysts
analyst_readonly_fields = [ analyst_readonly_fields = [
"user", "user",
"e_mail",
] ]
def get_readonly_fields(self, request, obj=None): def get_readonly_fields(self, request, obj=None):