mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 08:48:25 -04:00
Merge pull request #1466 from GSA/1155-remove-expired-invites
Removed canceled users from displaying in dashboard
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
<div class="user-list">
|
<div class="user-list">
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
|
{% if user.status != 'cancelled' %}
|
||||||
<div class="user-list-item">
|
<div class="user-list-item">
|
||||||
<h2 class="user-list-item-heading font-body-lg margin-top-0" title="{{ user.email_address }}">
|
<h2 class="user-list-item-heading font-body-lg margin-top-0" title="{{ user.email_address }}">
|
||||||
{%- if user.name -%}
|
{%- if user.name -%}
|
||||||
@@ -83,15 +84,17 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.has_permissions('manage_service') %}
|
{% if current_user.has_permissions('manage_service') %}
|
||||||
{% if user.status == 'pending' %}
|
{% if user.status == 'pending' or user.status == 'expired' %}
|
||||||
<a class="user-list-edit-link usa-link" href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
|
<a class="user-list-edit-link usa-link" href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
|
||||||
{% elif user.status == 'expired' %}
|
{% endif %}
|
||||||
|
{% if user.status == 'expired' %}
|
||||||
<a class="user-list-edit-link usa-link" href="{{ url_for('.resend_invite', service_id=current_service.id, invited_user_id=user.id)}}">Resend invite<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
|
<a class="user-list-edit-link usa-link" href="{{ url_for('.resend_invite', service_id=current_service.id, invited_user_id=user.id)}}">Resend invite<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
|
||||||
{% elif user.is_editable_by(current_user) %}
|
{% elif user.is_editable_by(current_user) %}
|
||||||
<a class="user-list-edit-link usa-link" href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Change details<span class="usa-sr-only"> for {{ user.name }} {{ user.email_address }}</span></a>
|
<a class="user-list-edit-link usa-link" href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Change details<span class="usa-sr-only"> for {{ user.name }} {{ user.email_address }}</span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1249,14 +1249,15 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service(
|
|||||||
"Cancel invitation for invited_user@test.gsa.gov"
|
"Cancel invitation for invited_user@test.gsa.gov"
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
# Test case removed due to the removal of canceled users from the dashboard
|
||||||
"cancelled",
|
# (
|
||||||
(
|
# "cancelled",
|
||||||
"invited_user@test.gsa.gov(cancelled invite) "
|
# (
|
||||||
"Permissions"
|
# "invited_user@test.gsa.gov(cancelled invite) "
|
||||||
# all permissions are greyed out
|
# "Permissions"
|
||||||
),
|
# # all permissions are greyed out
|
||||||
),
|
# ),
|
||||||
|
# ),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_manage_users_shows_invited_user(
|
def test_manage_users_shows_invited_user(
|
||||||
|
|||||||
Reference in New Issue
Block a user