Merge pull request #2975 from alphagov/folder-summary-team-page

Folder summary team page
This commit is contained in:
Chris Hill-Scott
2019-05-17 14:30:20 +01:00
committed by GitHub
3 changed files with 17 additions and 13 deletions

View File

@@ -168,9 +168,6 @@ class User(UserMixin):
"""
Returns list of template folders that a user can view for a given service
"""
if not service.has_permission('edit_folder_permissions'):
return service.all_template_folders
return [
template_folder
for template_folder in service.all_template_folders

View File

@@ -48,17 +48,8 @@
label
) }}
{% endfor %}
{% if current_service.has_permission('email_auth') %}
<div class="tick-cross-list-hint">
{% if user.auth_type == 'sms_auth' %}
Signs in with a text message code
{% else %}
Signs in with an email link
{% endif %}
</div>
{% endif %}
{# only show if the service has folders #}
{% if current_service.has_permission('edit_folder_permissions') and current_service.all_template_folders %}
{% if current_service.all_template_folders %}
<div class="tick-cross-list-hint">
{% set folder_count = user.template_folders_for_service(current_service) | length %}
@@ -71,6 +62,15 @@
{% endif%}
</div>
{% endif %}
{% if current_service.has_permission('email_auth') %}
<div class="tick-cross-list-hint">
{% if user.auth_type == 'sms_auth' %}
Signs in with a text message code
{% else %}
Signs in with an email link
{% endif %}
</div>
{% endif %}
</div>
{% if current_user.has_permissions('manage_service') %}
<li class="tick-cross-list-edit-link">