Security tab in home grown Product
I'm resending this to the zope list, because I didn't get any response from the zope-dev list. Hi. I have made my first Product (a little message wall that people can post colored messages to), but I am having some trouble with the Security tab. When I press the tab, I get a Permissions screen that looks as it should, but when I click the change button (no matter what permissions I change, if any), I get the following error: Sorry, an error occurred. Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 877, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 590, in publish (Info: /wall/manage_changePermissions) File /usr/local/zope/lib/python/AccessControl/Role.py, line 194, in manage_changePermissions (Object: RoleManager) File /usr/local/zope/lib/python/AccessControl/Permission.py, line 166, in setRoles AttributeError: manage_main I don't doubt that I am causing this, but since it isn't occuring in my code, I don't know how to go about finding the source of the problem. Thanks for any help you can give. -james [] James A. Hillyerd <jamesh@altavista.net> Java Developer [] HyperGlyphics: http://www.hyperglyphics.com/ [] GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01): [] C86F B073 92DF 1E24 EF0B 0118 6061 0FEC 9F95 6CDE
"James A. Hillyerd" wrote:
I'm resending this to the zope list, because I didn't get any response from the zope-dev list.
Hi.
I have made my first Product (a little message wall that people can post colored messages to), but I am having some trouble with the Security tab. When I press the tab, I get a Permissions screen that looks as it should, but when I click the change button (no matter what permissions I change, if any), I get the following error:
Sorry, an error occurred.
Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 877, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 590, in publish (Info: /wall/manage_changePermissions) File /usr/local/zope/lib/python/AccessControl/Role.py, line 194, in manage_changePermissions (Object: RoleManager) File /usr/local/zope/lib/python/AccessControl/Permission.py, line 166, in setRoles AttributeError: manage_main
I don't doubt that I am causing this, but since it isn't occuring in my code, I don't know how to go about finding the source of the problem.
Thanks for any help you can give.
Zope (up to 1.10.x) expects every managed object to have a manage_main method that provides the default management interface for the object. You need to rename or create an alias from your default management method to manage_main. In Zope 1.10, there will be a new inherited method, manage_workspace, which should not be overridden, that picks the first item in you manage_options as the default management interface. This gives you more flexibility in naming and will allow more dynamic view management. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
On Fri, 19 Mar 1999, Jim Fulton wrote:
Zope (up to 1.10.x) expects every managed object to have a manage_main method that provides the default management interface for the object.
You need to rename or create an alias from your default management method to manage_main.
Oh, I see. So the manage_main I see is actually being acquired from the folder my product instance is installed in? If so that would explain why adding things to it actually adds things to it's parent folder. If I write a manage_main method, will it start magically working, or do I need to add it to __init__.methods and/or one of the __ac_permissions__ tuples?
In Zope 1.10, there will be a new inherited method, manage_workspace, which should not be overridden, that picks the first item in you manage_options as the default management interface. This gives you more flexibility in naming and will allow more dynamic view management.
Sounds cool to me. =) [] James A. Hillyerd <jamesh@altavista.net> Java Developer [] HyperGlyphics: http://www.hyperglyphics.com/ [] GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01): [] C86F B073 92DF 1E24 EF0B 0118 6061 0FEC 9F95 6CDE
participants (2)
-
James A. Hillyerd -
Jim Fulton