mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 21:19:42 +02:00
Update add domain manager page content
This commit is contained in:
parent
42de7f2bb7
commit
8b61eb1275
2 changed files with 9 additions and 7 deletions
|
@ -19,8 +19,8 @@
|
||||||
{% endblock breadcrumb %}
|
{% endblock breadcrumb %}
|
||||||
<h1>Add a domain manager</h1>
|
<h1>Add a domain manager</h1>
|
||||||
|
|
||||||
<p>You can add another user to help manage your domain. They will need to sign
|
<p>You can add another user to help manage your domain. If they aren't an organization member they will
|
||||||
in to the .gov registrar with their Login.gov account.
|
need to sign in to the .gov registrar with their Login.gov account.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form class="usa-form usa-form--large" method="post" novalidate>
|
<form class="usa-form usa-form--large" method="post" novalidate>
|
||||||
|
|
|
@ -823,16 +823,16 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
existing_org_invitation = PortfolioInvitation.objects.filter(email=email).first()
|
existing_org_invitation = PortfolioInvitation.objects.filter(email=email).first()
|
||||||
requestor_org = UserPortfolioPermission.objects.get(user=requestor).portfolio
|
requestor_org = UserPortfolioPermission.objects.get(user=requestor).portfolio
|
||||||
print("Requestor org: ", requestor_org)
|
print("Requestor org: ", requestor_org)
|
||||||
if (existing_org_permission and existing_org_permission.portfolio != requestor_org) or \
|
if (existing_org_permission and existing_org_permission.portfolio != requestor_org) or (
|
||||||
(existing_org_invitation and existing_org_invitation.portfolio != requestor_org):
|
existing_org_invitation and existing_org_invitation.portfolio != requestor_org
|
||||||
add_success=False
|
):
|
||||||
|
add_success = False
|
||||||
messages.error(
|
messages.error(
|
||||||
self.request,
|
self.request,
|
||||||
f"That email is already a member of another .gov organization.",
|
f"That email is already a member of another .gov organization.",
|
||||||
)
|
)
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
|
|
||||||
# Check to see if an invite has already been sent
|
# Check to see if an invite has already been sent
|
||||||
try:
|
try:
|
||||||
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
||||||
|
@ -898,7 +898,9 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
else:
|
else:
|
||||||
# if user already exists then just send an email
|
# if user already exists then just send an email
|
||||||
try:
|
try:
|
||||||
self._send_domain_invitation_email(requested_email, requestor, requested_user=requested_user, add_success=False)
|
self._send_domain_invitation_email(
|
||||||
|
requested_email, requestor, requested_user=requested_user, add_success=False
|
||||||
|
)
|
||||||
except EmailSendingError:
|
except EmailSendingError:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"Could not send email invitation (EmailSendingError)",
|
"Could not send email invitation (EmailSendingError)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue