Skip to content

Commit c5bc9c2

Browse files
committed
issue2550953: Patch: fix for context.is_view_ok check in jinja2 template
Form controls are displayed when anonymous views indexes but is denied access. (patch by Anton Schur applied by John Rouillard)
1 parent 2ef5b27 commit c5bc9c2

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ Fixed:
460460
- query.item.html was missing checks to verify that a query should
461461
be visible to the user. This is fixed and users can only view
462462
queries that they own or that are not private. (John Rouillard)
463+
- issue2550953: Patch: fix for context.is_view_ok check in jinja2 template
464+
Form controls are displayed when anonymous views indexes but is
465+
denied access. (patch by Anton Schur applied by John Rouillard)
463466

464467
2016-01-11: 1.5.1
465468

share/roundup/templates/jinja2/html/_generic.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{% include 'layout/permission.html' %}
1414

15-
{% if context.is_view_ok %}
15+
{% if context.is_view_ok() %}
1616
<p class="form-help">{{ i18n.gettext('
1717
You may edit the contents of the
1818
class using this form. Commas, newlines and double quotes (") must be

share/roundup/templates/jinja2/html/issue.index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{% include 'layout/permission.html' %}
1414

15-
{% if context.is_view_ok %}
15+
{% if context.is_view_ok() %}
1616
{% if context.list() %}
1717
<table class='table'>
1818
<tr class='info'>
@@ -42,13 +42,7 @@
4242
</tr>
4343
{% endfor %}
4444
</table>
45-
{% else %}
46-
<p class='text-error'>{{ i18n.gettext('There are no issues yet!') }}</p>
47-
{% endif %}
48-
{% endif %}
49-
50-
{% include 'layout/pagination.html' %}
51-
45+
{% include 'layout/pagination.html' %}
5246
<div class='row-fluid'>
5347
<div class='pull-right'>
5448
<a class='btn btn-success'
@@ -60,4 +54,10 @@
6054

6155
{% include 'layout/sort.html' %}
6256

57+
{% else %}
58+
<p class='text-error'>{{ i18n.gettext('There are no issues yet!') }}</p>
59+
{% endif %}
60+
61+
{% endif %}
62+
6363
{% endblock %}

0 commit comments

Comments
 (0)