Skip to content

Commit 03a2000

Browse files
committed
Revert "Fix/user permissions (#462)"
This reverts commit 860eecb.
1 parent b853ea1 commit 03a2000

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ckanext/querytool/templates/group/reports.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% set delete_url = h.url_for('querytool_delete', querytool='/' + querytool.name) %}
1919
{% set member_type = h.get_user_permission_type(c.userobj, querytool.group) %}
2020

21-
{% if h.get_groups_for_user(c.userobj, querytool.group) and ((member_type == 'member' and querytool.private != True) or member_type == 'admin') or c.userobj.sysadmin %}
21+
{% if h.get_groups_for_user(c.userobj, querytool.group) and ((member_type == 'member' and querytool.private != True) or member_type == 'admin') %}
2222
<div class="applicaitons-box">
2323

2424
<div class="thumb">
@@ -48,7 +48,7 @@ <h2>{{ querytool.title }}</h2>
4848
{% set user_permission = h.get_groups_for_user(c.userobj, querytool.group) %}
4949
{% set user_type = h.get_user_permission_type(c.userobj, querytool.group) %}
5050

51-
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' or c.userobj.sysadmin %}
51+
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' %}
5252
<li><a class="btn btn-minimal" role="button" href="{{ edit_data_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit filters and data') }}</a></li>
5353
<li><a class="btn btn-minimal" role="button" href="{{ edit_visualizations_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit visualizations') }}</a></li>
5454
<li><a class="btn btn-minimal" role="button" href="{{ h.url_for('querytool_public_read', name=querytool.name) }}" type="submit" name="view"><span class="fa fa-eye" aria-hidden="true"></span> {{ _('View') }}</a></li>
@@ -92,7 +92,7 @@ <h2>{{ querytool.title }}</h2>
9292
{% set user_permission = h.get_groups_for_user(c.userobj, querytool.group) %}
9393
{% set user_type = h.get_user_permission_type(c.userobj, querytool.group) %}
9494

95-
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' or c.userobj.sysadmin %}
95+
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' %}
9696
<li><a class="btn" href="{{ edit_data_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit filters and data') }}</a></li>
9797
<li><a class="btn" href="{{ edit_visualizations_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit visualizations') }}</a></li>
9898
<li><a class="btn" href="{{ h.url_for('querytool_public_read', name=querytool.name) }}" type="submit" name="view"><span class="fa fa-eye" aria-hidden="true"></span> {{ _('View') }}</a></li>

ckanext/querytool/templates/querytool/admin/snippets/query_tools.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% set delete_url = h.url_for('querytool_delete', querytool='/' + querytool.name) %}
1515
{% set user_type = h.get_user_permission_type(c.userobj, querytool.group) %}
1616

17-
{% if h.get_groups_for_user(c.userobj, querytool.group) and ((user_type == 'member' and querytool.private != True) or user_type == 'admin') or c.userobj.sysadmin %}
17+
{% if h.get_groups_for_user(c.userobj, querytool.group) and ((user_type == 'member' and querytool.private != True) or user_type == 'admin') %}
1818
<div class="applicaitons-box">
1919

2020
<div class="thumb">
@@ -43,7 +43,7 @@ <h2>{{ querytool.title }}</h2>
4343
<ul class="buttons-group">
4444
{% set user_permission = h.get_groups_for_user(c.userobj, querytool.group) %}
4545

46-
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' or c.userobj.sysadmin %}
46+
{% if user_type in ['admin', 'editor'] or user_permission and user_type != 'member' %}
4747
<li><a class="btn btn-minimal" role="button" href="{{ edit_data_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit filters and data') }}</a></li>
4848
<li><a class="btn btn-minimal" role="button" href="{{ edit_visualizations_url}}" type="submit" name="edit"><span class="fa fa-pencil" aria-hidden="true"></span> {{ _('Edit visualizations') }}</a></li>
4949
<li><a class="btn btn-minimal" role="button" href="{{ h.url_for('querytool_public_read', name=querytool.name) }}" type="submit" name="view"><span class="fa fa-eye" aria-hidden="true"></span> {{ _('View') }}</a></li>

0 commit comments

Comments
 (0)