Skip to content

Commit 938d9de

Browse files
author
Richard Jones
committed
restrict access to the generic class edit form
1 parent 5b835f5 commit 938d9de

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

roundup/templates/classic/html/_generic.index

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<!-- dollarId: issue.index,v 1.2 2001/07/29 04:07:37 richard Exp dollar-->
2+
<tal:block tal:define="
3+
editok python:request.user.hasPermission('Edit') or
4+
context.id == request.user.id;
5+
viewok python:request.user.hasPermission('View')">
26

7+
<span tal:condition="python:not (viewok or editok)">
8+
You are not allowed to view this page.
9+
</span>
10+
11+
<tal:block tal:condition="editok">
312
<p class="form-help">
413
You may edit the contents of the <span tal:replace="request/classname" />
514
class using this form. Commas, newlines and double quotes (") must be
@@ -24,4 +33,10 @@
2433
<input type="hidden" name=":action" value="editCSV">
2534
<input type="submit" value="Edit Items">
2635
</form>
36+
</tal:block>
37+
38+
<tal:block tal:condition="python:viewok and not editok">
39+
view ok
40+
</tal:block>
2741

42+
</tal:block>

0 commit comments

Comments
 (0)