Merge pull request #426 from dod-ccpo/invite-errors-#161347944
display error alert for users who had DOD ID conflict when accepting …
This commit is contained in:
commit
d78c6de386
@ -57,6 +57,10 @@ class WorkspaceRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
else:
|
||||
return "Unknown errors"
|
||||
|
||||
@property
|
||||
def has_dod_id_error(self):
|
||||
return self.latest_invitation and self.latest_invitation.is_rejected_wrong_user
|
||||
|
||||
|
||||
Index(
|
||||
"workspace_role_user_workspace",
|
||||
|
@ -37,6 +37,10 @@ class WorkspaceUser(object):
|
||||
def status(self):
|
||||
return self.workspace_role.display_status
|
||||
|
||||
@property
|
||||
def has_dod_id_error(self):
|
||||
return self.workspace_role.has_dod_id_error
|
||||
|
||||
@property
|
||||
def num_environment_roles(self):
|
||||
return (
|
||||
|
@ -4,9 +4,14 @@
|
||||
{% from "components/modal.html" import Modal %}
|
||||
{% from "components/selector.html" import Selector %}
|
||||
{% from "components/options_input.html" import OptionsInput %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if member.has_dod_id_error %}
|
||||
{{ Alert('CAC ID Error', message='The member attempted to accept this invite, but their CAC ID did not match the CAC ID you specified on the invite. Please confirm that the DOD ID is accurate.', level='error') }}
|
||||
{% endif %}
|
||||
|
||||
<form method="POST" action="{{ url_for('workspaces.update_member', workspace_id=workspace.id, member_id=member.user_id) }}" autocomplete="false">
|
||||
{{ form.csrf_token }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user