[Zope] access problem/security issue
Maik Jablonski
maik.jablonski@uni-bielefeld.de
06 Jun 2002 09:04:00 +0200
On Thu, 2002-06-06 at 08:20, Robert Rottermann wrote:
> Hi there,
> I have a security issue I am not able to solve.
>
> In a product I define a class:
>
> class PersonRecord (persistentRedPMBase):
> #security = ClassSecurityInfo()
> is_group = 0
> is_type = PERSONTYPE
> firstname = ''
> lastname=''
>
> uniqueid = None
> def __getitem__(self, key):
> return self.__dict__[key]
>
> def getUniqueId ( self ) :
> return uniqueid
>
> def setFirstname(self, firstname):
> self.firstname = firstname
>
>
> def getFirstname(self):
> return firstname
>
> I can create and store and retrieve such records. However when I try to access one
> of its datamebers I get an access error
> You are not allowed to access setFirstname in this context
>
> What is my mistake ??
maybe you should try this... you've forgotten the selfs...
def getUniqueId ( self ) :
return self.uniqueid <= self is important!
[... ]
def getFirstname(self):
return self.firstname <= self is important!
greetings, maik
Deutsche Zope User Group
http://www.dzug.org/