diff roundup/cgi/templating.py @ 2827:43e3a7ac1190

fix HTMLClass.is_view_ok: permission to create new items never means the user is allowed to view the class.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Mon, 25 Oct 2004 09:15:23 +0000
parents 10a49678ebf2
children 6acc315570eb
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Sun Oct 24 11:38:54 2004 +0000
+++ b/roundup/cgi/templating.py	Mon Oct 25 09:15:23 2004 +0000
@@ -445,10 +445,8 @@
     def is_view_ok(self):
         ''' Is the user allowed to View the current class?
         '''
-        if self._db.security.hasPermission('View', self._client.userid,
-                self._classname):
-            return 1
-        return self.is_edit_ok()
+        return self._db.security.hasPermission('View', self._client.userid,
+            self._classname)
 
     def is_only_view_ok(self):
         ''' Is the user only allowed to View (ie. not Create) the current class?
@@ -612,7 +610,7 @@
         If the "property" arg is given, it's passed through to the
         javascript help_window function.
 
-        If the "form" arg is given, it's passed through to the 
+        If the "form" arg is given, it's passed through to the
         javascript help_window function. - it's the name of the form
         the "property" belongs to.
         '''

Roundup Issue Tracker: http://roundup-tracker.org/