File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1- # $Id: client.py,v 1.130.2.2 2003-08-28 04:53:04 richard Exp $
1+ # $Id: client.py,v 1.130.2.3 2003-10-24 09:31:13 jlgijsbers Exp $
22
33__doc__ = """
44WWW request handler (also used in the stand-alone server).
@@ -1031,7 +1031,8 @@ def editItemPermission(self, props):
10311031 'user' ):
10321032 return 0
10331033 # if the item being edited is the current user, we're ok
1034- if self .nodeid == self .userid :
1034+ if (self .nodeid == self .userid
1035+ and self .db .user .get (self .nodeid , 'username' ) != 'anonymous' ):
10351036 return 1
10361037 if self .db .security .hasPermission ('Edit' , self .userid , self .classname ):
10371038 return 1
Original file line number Diff line number Diff line change @@ -807,14 +807,16 @@ def is_edit_ok(self):
807807 Also check whether this is the current user's info.
808808 '''
809809 return self ._db .security .hasPermission ('Edit' , self ._client .userid ,
810- self ._classname ) or self ._nodeid == self ._client .userid
810+ self ._classname ) or (self ._nodeid == self ._client .userid and
811+ self ._db .user .get (self ._client .userid , 'username' ) != 'anonymous' )
811812
812813 def is_view_ok (self ):
813814 ''' Is the user allowed to View the current class?
814815 Also check whether this is the current user's info.
815816 '''
816817 return self ._db .security .hasPermission ('Edit' , self ._client .userid ,
817- self ._classname ) or self ._nodeid == self ._client .userid
818+ self ._classname ) or (self ._nodeid == self ._client .userid and
819+ self ._db .user .get (self ._client .userid , 'username' ) != 'anonymous' )
818820
819821class HTMLProperty :
820822 ''' String, Number, Date, Interval HTMLProperty
You can’t perform that action at this time.
0 commit comments