mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-01 18:18:34 +02:00
updated related mentions to admin to be Manager
This commit is contained in:
parent
485a05e45e
commit
649a224562
6 changed files with 11 additions and 11 deletions
|
@ -42,7 +42,7 @@ as health checks used by our platform).
|
||||||
## Adding roles
|
## Adding roles
|
||||||
|
|
||||||
The current MVP design uses only a single role called
|
The current MVP design uses only a single role called
|
||||||
`UserDomainRole.Roles.ADMIN` that has all access on a domain. As such, the
|
`UserDomainRole.Roles.MANAGER` that has all access on a domain. As such, the
|
||||||
permission mixin doesn't need to examine the `role` field carefully. In the
|
permission mixin doesn't need to examine the `role` field carefully. In the
|
||||||
future, as we add additional roles that our product vision calls for
|
future, as we add additional roles that our product vision calls for
|
||||||
(read-only? editing only some information?), we need to add conditional
|
(read-only? editing only some information?), we need to add conditional
|
||||||
|
|
|
@ -582,7 +582,7 @@ class DomainApplication(TimeStampedModel):
|
||||||
# create the permission for the user
|
# create the permission for the user
|
||||||
UserDomainRole = apps.get_model("registrar.UserDomainRole")
|
UserDomainRole = apps.get_model("registrar.UserDomainRole")
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.creator, domain=created_domain, role=UserDomainRole.Roles.ADMIN
|
user=self.creator, domain=created_domain, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
|
|
||||||
self._send_status_update_email(
|
self._send_status_update_email(
|
||||||
|
|
|
@ -63,7 +63,7 @@ class DomainInvitation(TimeStampedModel):
|
||||||
|
|
||||||
# and create a role for that user on this domain
|
# and create a role for that user on this domain
|
||||||
_, created = UserDomainRole.objects.get_or_create(
|
_, created = UserDomainRole.objects.get_or_create(
|
||||||
user=user, domain=self.domain, role=UserDomainRole.Roles.ADMIN
|
user=user, domain=self.domain, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
if not created:
|
if not created:
|
||||||
# something strange happened and this role already existed when
|
# something strange happened and this role already existed when
|
||||||
|
|
|
@ -601,7 +601,7 @@ class TestInvitations(TestCase):
|
||||||
def test_retrieve_existing_role_no_error(self):
|
def test_retrieve_existing_role_no_error(self):
|
||||||
# make the overlapping role
|
# make the overlapping role
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user, domain=self.domain, role=UserDomainRole.Roles.ADMIN
|
user=self.user, domain=self.domain, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
# this is not an error but does produce a console warning
|
# this is not an error but does produce a console warning
|
||||||
with less_console_noise():
|
with less_console_noise():
|
||||||
|
|
|
@ -89,7 +89,7 @@ class LoggedInTests(TestWithUser):
|
||||||
domain, _ = Domain.objects.get_or_create(name="igorville.gov")
|
domain, _ = Domain.objects.get_or_create(name="igorville.gov")
|
||||||
self.assertNotContains(response, "igorville.gov")
|
self.assertNotContains(response, "igorville.gov")
|
||||||
role, _ = UserDomainRole.objects.get_or_create(
|
role, _ = UserDomainRole.objects.get_or_create(
|
||||||
user=self.user, domain=domain, role=UserDomainRole.Roles.ADMIN
|
user=self.user, domain=domain, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
response = self.client.get("/")
|
response = self.client.get("/")
|
||||||
# count = 2 because it is also in screenreader content
|
# count = 2 because it is also in screenreader content
|
||||||
|
@ -1097,23 +1097,23 @@ class TestWithDomainPermissions(TestWithUser):
|
||||||
creator=self.user, domain=self.domain_dnssec_none
|
creator=self.user, domain=self.domain_dnssec_none
|
||||||
)
|
)
|
||||||
self.role, _ = UserDomainRole.objects.get_or_create(
|
self.role, _ = UserDomainRole.objects.get_or_create(
|
||||||
user=self.user, domain=self.domain, role=UserDomainRole.Roles.ADMIN
|
user=self.user, domain=self.domain, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user, domain=self.domain_dsdata, role=UserDomainRole.Roles.ADMIN
|
user=self.user, domain=self.domain_dsdata, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user,
|
user=self.user,
|
||||||
domain=self.domain_multdsdata,
|
domain=self.domain_multdsdata,
|
||||||
role=UserDomainRole.Roles.ADMIN,
|
role=UserDomainRole.Roles.MANAGER,
|
||||||
)
|
)
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user, domain=self.domain_keydata, role=UserDomainRole.Roles.ADMIN
|
user=self.user, domain=self.domain_keydata, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
UserDomainRole.objects.get_or_create(
|
UserDomainRole.objects.get_or_create(
|
||||||
user=self.user,
|
user=self.user,
|
||||||
domain=self.domain_dnssec_none,
|
domain=self.domain_dnssec_none,
|
||||||
role=UserDomainRole.Roles.ADMIN,
|
role=UserDomainRole.Roles.MANAGER,
|
||||||
)
|
)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
|
|
@ -736,7 +736,7 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
UserDomainRole.objects.create(
|
UserDomainRole.objects.create(
|
||||||
user=requested_user, domain=self.object, role=UserDomainRole.Roles.ADMIN
|
user=requested_user, domain=self.object, role=UserDomainRole.Roles.MANAGER
|
||||||
)
|
)
|
||||||
except IntegrityError:
|
except IntegrityError:
|
||||||
# User already has the desired role! Do nothing??
|
# User already has the desired role! Do nothing??
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue