display error alert for users who had DOD ID conflict when accepting workspace invitation
This commit is contained in:
parent
0c7fb4ca9b
commit
5fc9dbd177
@ -57,6 +57,10 @@ class WorkspaceRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
|||||||
else:
|
else:
|
||||||
return "Unknown errors"
|
return "Unknown errors"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_dod_id_error(self):
|
||||||
|
return self.latest_invitation and self.latest_invitation.is_rejected_wrong_user
|
||||||
|
|
||||||
|
|
||||||
Index(
|
Index(
|
||||||
"workspace_role_user_workspace",
|
"workspace_role_user_workspace",
|
||||||
|
@ -37,6 +37,10 @@ class WorkspaceUser(object):
|
|||||||
def status(self):
|
def status(self):
|
||||||
return self.workspace_role.display_status
|
return self.workspace_role.display_status
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_dod_id_error(self):
|
||||||
|
return self.workspace_role.has_dod_id_error
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def num_environment_roles(self):
|
def num_environment_roles(self):
|
||||||
return (
|
return (
|
||||||
|
@ -4,9 +4,14 @@
|
|||||||
{% from "components/modal.html" import Modal %}
|
{% from "components/modal.html" import Modal %}
|
||||||
{% from "components/selector.html" import Selector %}
|
{% from "components/selector.html" import Selector %}
|
||||||
{% from "components/options_input.html" import OptionsInput %}
|
{% from "components/options_input.html" import OptionsInput %}
|
||||||
|
{% from "components/alert.html" import Alert %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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 method="POST" action="{{ url_for('workspaces.update_member', workspace_id=workspace.id, member_id=member.user_id) }}" autocomplete="false">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user