Skip to content

Commit f5ffbb0

Browse files
authored
Show admin access in datasource lists (#714)
1 parent 32e8705 commit f5ffbb0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

controlpanel/frontend/jinja2/includes/datasource-list.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@
3636
Webapp
3737
{%- endif -%}
3838
{%- else -%}
39-
{% if datasource.access_level(user).lower() == 'readwrite' -%}
40-
Read/write
41-
{%- else -%}
42-
Read only
43-
{%- endif %}
39+
{% with access_level = datasource.access_level(user).lower() -%}
40+
{% if access_level == 'admin' -%}
41+
Admin
42+
{%- elif access_level == 'readwrite' -%}
43+
Read/write
44+
{%- else -%}
45+
Read only
46+
{%- endif %}
47+
{%- endwith %}
4448
{%- endif -%}
4549
</td>
4650
<td class="govuk-table__cell align-right no-wrap">

0 commit comments

Comments
 (0)