{% extends "access_grant_funding/base.html" %} {% from "govuk_frontend_jinja/components/table/macro.html" import govukTable %} {% set active_item_identifier = "team" %} {% set page_title = "Team" %} {% block content %}

{{ page_title }}

{% if users | length == 0 %}

There are no users for this grant.

{% else %} {% set rows = [] %} {% for user in users %} {% set permissions = [] %} {% for role in user.roles %} {% if role.organisation_id == organisation.id and (role.grant_id is none or role.grant_id == grant_recipient.grant.id) %} {% for permission in role.permissions %} {% if permission == enum.role_enum.CERTIFIER %} {% do permissions.append("Can certify") %} {% elif permission == enum.role_enum.DATA_PROVIDER %} {% do permissions.append("Can edit and submit") %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% set permission_text = permissions | unique | sort | join(', ') %} {% do rows.append([{"text": user.name}, {"text": user.email}, {"text": permission_text}]) %} {% endfor %} {{ govukTable({ "captionClasses": "govuk-table__caption--m", "firstCellIsHeader": false, "head": [{"text": "Name"}, {"text": "Email"}, {"text": "Permissions"}], "rows": rows }) }} {% endif %}

Changing access and permissions

To add or remove people and change their permissions, contact us through our support desk (opens in new tab).

Monday to Friday, 9am to 5pm (except public holidays).

{% endblock content %}