mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Merge branch 'master' into email_from_uniqueness
This commit is contained in:
@@ -60,7 +60,9 @@ def invite_user(service_id):
|
|||||||
# view_activity is a default role to be added to all users.
|
# view_activity is a default role to be added to all users.
|
||||||
# All users will have at minimum view_activity to allow users to see notifications,
|
# All users will have at minimum view_activity to allow users to see notifications,
|
||||||
# templates, team members but no update privileges
|
# templates, team members but no update privileges
|
||||||
permissions = ','.join(role for role in roles.keys() if request.form.get(role) == 'y').join('view_activity')
|
selected_permissions = [role for role in sorted(roles.keys()) if request.form.get(role) == 'y']
|
||||||
|
selected_permissions.append('view_activity')
|
||||||
|
permissions = ','.join(selected_permissions)
|
||||||
invited_user = invite_api_client.create_invite(
|
invited_user = invite_api_client.create_invite(
|
||||||
current_user.id,
|
current_user.id,
|
||||||
service_id,
|
service_id,
|
||||||
|
|||||||
@@ -79,7 +79,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="column-one-third">
|
<div class="column-one-third">
|
||||||
<h2>About</h2>
|
<h2>About</h2>
|
||||||
<a href="{{ url_for("main.help") }}">Help</a>
|
<ul>
|
||||||
|
<li><a href="{{ url_for("main.help") }}">Help</a></li>
|
||||||
|
<li><a href="{{ url_for("main.terms") }}">Terms of use</a></li>
|
||||||
|
<li><a href="{{ url_for("main.cookies") }}">Cookies</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="column-one-third">
|
<div class="column-one-third">
|
||||||
<h2>Developers</h2>
|
<h2>Developers</h2>
|
||||||
@@ -92,8 +96,6 @@
|
|||||||
|
|
||||||
{% block footer_support_links %}
|
{% block footer_support_links %}
|
||||||
<nav class="footer-nav">
|
<nav class="footer-nav">
|
||||||
<a href="{{ url_for("main.terms") }}">Terms of use</a>
|
|
||||||
<a href="{{ url_for("main.cookies") }}">Cookies</a>
|
|
||||||
Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service">Government Digital Service</a>
|
Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service">Government Digital Service</a>
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -161,6 +161,11 @@ def test_invite_user(
|
|||||||
assert page.h1.string.strip() == 'Manage team'
|
assert page.h1.string.strip() == 'Manage team'
|
||||||
flash_banner = page.find('div', class_='banner-default-with-tick').string.strip()
|
flash_banner = page.find('div', class_='banner-default-with-tick').string.strip()
|
||||||
assert flash_banner == 'Invite sent to test@example.gov.uk'
|
assert flash_banner == 'Invite sent to test@example.gov.uk'
|
||||||
|
excpected_permissions = 'manage_api_keys,manage_service,send_messages,view_activity'
|
||||||
|
app.invite_api_client.create_invite.assert_called_once_with(sample_invite['from_user'],
|
||||||
|
sample_invite['service'],
|
||||||
|
email_address,
|
||||||
|
excpected_permissions)
|
||||||
|
|
||||||
|
|
||||||
def test_cancel_invited_user_cancels_user_invitations(app_,
|
def test_cancel_invited_user_cancels_user_invitations(app_,
|
||||||
|
|||||||
Reference in New Issue
Block a user