RE: [Zope-dev] Re: Better encapsulation is good...
Well, I'm at a loss. I tried a bunch things myself, and I've found out that instances of the Article class are not inheriting __ac_permissions__ from the Posting class. In fact, even if you override __ac_permissions__ in the Article class, the validate() method is reporting there's nothing there. What I don't understand is, SquishSite works, and SquishFile works, what's so different about the Posting/Article classes? I thought all one had to do was inherit RoleManager, and set everything properly in __ac_permissions__ ? Or am I totally not getting the 2.2 Security model? Do you know what's going on here?
Did you run the Article class through Globals.default__class_init__()? E.g. (at the module level), e.g.: Globals.default__class_init__(Article)
On Fri, 25 Aug 2000, Chris McDonough wrote:
Did you run the Article class through Globals.default__class_init__()? E.g. (at the module level), e.g.:
Globals.default__class_init__(Article)
Yes, I tried this too, (saw it in the mailing list archive). I still don't understand why it's not working. I can give you the exact line where in the validate() method in ZopeSecurityPolicy.py it's failing (line 161), if it helps at all (again, I'm not well versed in the Zope security internals): if p is None: p=getattr(container, '__allow_access_to_unprotected_subobjects__', None) getattr() returns None, then this happens: if not p: if (containerbase is accessedbase): raise 'Unauthorized', cleanupName(name, value) Any suggestions would be helpful, -Lance
Chris McDonough wrote:
Did you run the Article class through Globals.default__class_init__()? E.g. (at the module level), e.g.:
Globals.default__class_init__(Article)
Yup, all the possible related classes have been run through this... cheers, Chris
participants (3)
-
Chris McDonough -
Chris Withers -
odysseus@acedsl.com