diff --git a/backend/core/admin.py b/backend/core/admin.py index 9302bfe2368fbf77b60615a4fdf7bbb7baaee790..9598b953d8bcb6c9cd0045ee101dbe133c295da7 100644 --- a/backend/core/admin.py +++ b/backend/core/admin.py @@ -58,7 +58,7 @@ class UserAdmin(BaseUserAdmin): # The fields to be used in displaying the User model. # These override the definitions on the base UserAdmin # that reference specific fields on auth.User. - list_display = ('is_admin',) + list_display = ('username', 'is_admin',) list_filter = ('is_admin',) fieldsets = ( (None, {'fields': ('password',)}), diff --git a/backend/core/models.py b/backend/core/models.py index f691395872baabf78983b9a75b6166feac17928d..01218655b51f2038ba486d39aeac3ff74614ade8 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -203,6 +203,12 @@ class UserAccount(AbstractBaseUser): USERNAME_FIELD = 'username' + def has_perm(self, *args): + return self.is_superuser + + def has_module_perms(self, *args): + return self.is_superuser + def get_associated_user(self): """ Returns the user type that is associated with this user obj """ return \