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.142 2003-10-22 16:47:55 jlgijsbers Exp $
1+ # $Id: client.py,v 1.143 2003-10-24 09:32:19 jlgijsbers Exp $
22
33__doc__ = """
44WWW request handler (also used in the stand-alone server).
@@ -970,7 +970,8 @@ def editItemPermission(self, props):
970970 'user' ):
971971 return 0
972972 # if the item being edited is the current user, we're ok
973- if self .nodeid == self .userid :
973+ if (self .nodeid == self .userid
974+ and self .db .user .get (self .nodeid , 'username' ) != 'anonymous' ):
974975 return 1
975976 if self .db .security .hasPermission ('Edit' , self .userid , self .classname ):
976977 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