adding local roles to folders within a Product
I have a ZClass-based product. The folder (should I be calling this an Application Object? :-) ) that contains all the product methods and objects that are accessible via the web has some local roles defined on it. I'm making a sort of Wizard to instantiate a new application instance. This happens by copying an empty application folder from within the ZClass product, to a chosen place in the standard part of the ZODB object heirarchy. I want to define the local roles on the "prototype" folder that is inside my Product. However, when I go to Control_Panel/Products/MyProduct/prototype/manage_access, I get the "map permissions to permissions" screen, rather than the "map permissions to roles, and define local roles" screen. Can I define local roles on my prototype folder -- perhaps using an external method, or DTML API calls to do it? Or, is there some reason that local roles don't make sense within products, and so I have to copy my prototype folder to elsewhere in the ZODB, and then set the local roles? -- Steve Alexander Software Enigineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
I want to define the local roles on the "prototype" folder that is inside my Product. However, when I go to Control_Panel/Products/MyProduct/prototype/manage_access, I get the "map permissions to permissions" screen, rather than the "map permissions to roles, and define local roles" screen.
Can I define local roles on my prototype folder -- perhaps using an external method, or DTML API calls to do it?
Or, is there some reason that local roles don't make sense within products, and so I have to copy my prototype folder to elsewhere in the ZODB, and then set the local roles?
Correction: I mean "user-defined roles" rather than local roles. -- Steve Alexander Software Enigineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
Or, is there some reason that local roles don't make sense within products, and so I have to copy my prototype folder to elsewhere in the ZODB, and then set the local roles?
Correction: I mean "user-defined roles" rather than local roles.
Well, I can add user-defined roles to my folder in a Product by using the URL prototypefolder/manage_defined_roles?submit=Add+Role&role=NewRole I can check this with prototypefolder/userdefined_roles It seems to work, even though I can't get a sensible management interface for them. The reason I can't get the management interface for local roles is that Product.py defines the attribute _isBeingUsedAsAMethod_=1. This attribute is acquired, and checked, in Role.py, and a different management screen is shown depending on its value. Is there an easy way of declaring that my prototype folder is not being used as a method? Or do I have to subclass it from Python and set the magic attribute there? Will I be tripping myself up on anything if I go ahead and set the user-defined roles I want anyway? -- Steve Alexander Software Enigineer Cat-Box limited http://www.cat-box.net
participants (1)
-
Steve Alexander