[Zope] Python script/security help
Keith Alperin
KAlperin@ignitesports.com
Wed, 5 Dec 2001 13:40:11 -0600
Evan, that document told me everything I needed to know. Thank you for
pointing it out. My problem was that my Property class did not inherit
from Acquisition.Implicit, thus rendering the security infrastructure
unusable.
Thanks again!
Keith
-----Original Message-----
From: Evan Simpson [mailto:evan@4-am.com]=20
Sent: Wednesday, December 05, 2001 10:19 AM
To: Keith Alperin
Cc: zope@zope.org
Subject: Re: [Zope] Python script/security help
Keith Alperin wrote:
> security =3D ClassSecurityInfo()
> security.declarePublic('getValue')
> def getValue(self):
> """returns the value of this property"""
> return self.value
If you haven't already, read=20
http://dev.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecur
ityForDevelopers,=20
in particular the example right before the paragraph that starts with:
"Note the last line in the example. In order for security assertions
to=20
be correctly applied to your class, you must call the global class=20
initializer for all classes that have security information."
Hopefully this will solve your problem.
Cheers,
Evan @ Zope