[Zope-dev] __ac_permissions__ confusion
Michel Pelletier
michel@digicool.com
Wed, 01 Mar 2000 16:55:12 -0800
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