Skip to content

Commit d9e80f3

Browse files
author
Alexander Smishlajev
committed
fix HTMLClass.is_view_ok: permission to create new items
never means the user is allowed to view the class.
1 parent 2c5d506 commit d9e80f3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

roundup/cgi/templating.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,8 @@ def is_edit_ok(self):
445445
def is_view_ok(self):
446446
''' Is the user allowed to View the current class?
447447
'''
448-
if self._db.security.hasPermission('View', self._client.userid,
449-
self._classname):
450-
return 1
451-
return self.is_edit_ok()
448+
return self._db.security.hasPermission('View', self._client.userid,
449+
self._classname)
452450

453451
def is_only_view_ok(self):
454452
''' Is the user only allowed to View (ie. not Create) the current class?
@@ -612,7 +610,7 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
612610
If the "property" arg is given, it's passed through to the
613611
javascript help_window function.
614612
615-
If the "form" arg is given, it's passed through to the
613+
If the "form" arg is given, it's passed through to the
616614
javascript help_window function. - it's the name of the form
617615
the "property" belongs to.
618616
'''

0 commit comments

Comments
 (0)