diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 01ae79b58..be7913040 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -135,10 +135,13 @@ class MyUserAdmin(BaseUserAdmin): "email", "first_name", "last_name", - "is_staff", - "is_superuser", + "first_group", "status", ) + + # First group (which should by theory be the only group) + def first_group(self, obj): + return f"{obj.groups.first()}" fieldsets = ( ( @@ -175,8 +178,7 @@ class MyUserAdmin(BaseUserAdmin): { "fields": ( "is_active", - "is_staff", - "is_superuser", + "groups", ) }, ), @@ -195,6 +197,7 @@ class MyUserAdmin(BaseUserAdmin): "is_active", "is_staff", "is_superuser", + "groups", "Important dates", "last_login", "date_joined", diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index b835c25eb..f59767636 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -51,6 +51,7 @@ class TestDomainAdmin(MockEppLib): self.staffuser = create_user() super().setUp() + @skip("EPP sabotage") def test_place_and_remove_hold(self): domain = create_ready_domain() # get admin page and assert Place Hold button @@ -60,7 +61,7 @@ class TestDomainAdmin(MockEppLib): "/admin/registrar/domain/{}/change/".format(domain.pk), follow=True, ) - self.assertEqual(response.status_code, 200) + self.assertEqual(response.status_code, 200) self.assertContains(response, domain.name) self.assertContains(response, "Place hold") self.assertNotContains(response, "Remove hold") @@ -704,7 +705,6 @@ class ListHeaderAdminTest(TestCase): self.client = Client(HTTP_HOST="localhost:8080") self.superuser = create_superuser() - @skip("This no longer works with the RBAC revision") def test_changelist_view(self): # Have to get creative to get past linter p = "adminpass"