__ac_permissions__ confusion
hiya, i'm working on a python product for zope, but running into some confusion with permissions. one of the entries in my __ac_permissions__ for my base python class is: ('Search Etailer Shop', ['productSearch'], ['Anonymous', 'Manager']), which i had hoped would allow anonymous clients to access the productSearch method. it still however prompts for a username/password when i first try to access the method. if i go into the security management interface of the instance of that product and without changing any settings hit 'Change', the permissions work as expected: anonymous can view the method. my class inherits from Folder which inherits from RoleManager. what am i missing? i've had a look through ZCatalog, which appears to do exactly the same for the 'Search ZCatalog' permission. thanks -d -- Adroit | Dyon Balding dyon@adroitnet.com.au Internet | http://www.adroitnet.com.au/ Solutions | work: +613 98888522, mobile: +61 0414992604
Dyon Balding wrote:
hiya, i'm working on a python product for zope, but running into some confusion with permissions.
one of the entries in my __ac_permissions__ for my base python class is:
('Search Etailer Shop', ['productSearch'], ['Anonymous', 'Manager']),
which i had hoped would allow anonymous clients to access the productSearch method. it still however prompts for a username/password when i first try to access the method. if i go into the security management interface of the instance of that product and without changing any settings hit 'Change', the permissions work as expected: anonymous can view the method.
my class inherits from Folder which inherits from RoleManager.
what am i missing?
I bet you're missing this: Globals.default__class_init__(YourClass) In your module. Look for a similar thing in the ZCatalog.py module. default__class_init__ in a class initializtaion hook for ExtensionClasses. Without calling this, permissions do not get properly registered with the security system. -Michel
On Wed, Mar 01, 2000 at 04:55:12PM -0800, Michel Pelletier wrote:
what am i missing?
I bet you're missing this:
Globals.default__class_init__(YourClass)
In your module. Look for a similar thing in the ZCatalog.py module.
default__class_init__ in a class initializtaion hook for ExtensionClasses. Without calling this, permissions do not get properly registered with the security system.
i put that in, but i'm still getting the same problem. i took it out, and put in a print statement in the default__class_init__ and found that it's called anyway without explicitly calling it. any other ideas for debugging this? -d -- Adroit | Dyon Balding dyon@adroitnet.com.au Internet | http://www.adroitnet.com.au/ Solutions | work: +613 98888522, mobile: +61 0414992604
participants (2)
-
Dyon Balding -
Michel Pelletier