[Zope] AccessControl.Role.RoleManager &
nwingfield at dixon-hughes.com
nwingfield at dixon-hughes.com
Fri May 14 11:49:38 EDT 2004
I have written a simple class to function as pluggable brains for SQL
records. My class is called Document, and it looks like this:
class Document(RoleManager):
" class code here "
I need to set local roles on my result objects, so I am inheriting the
RoleManager class. Within the __init__() method of my Document class, I
make an SQL call to retrieve the local role mappings for the particular
document in question. Then I call "self.manage_setLocalRoles(userid, roles
)". This call fails, generating an AttributeError on __ac_local_roles__.
I believe this is because Zope's base Record class has put the kabosh on
setting any of its attributes. So at this point I am wondering if I have
attempted the impossible. If so, is my only recourse to write a wrapper
class that inherits from RoleManager and encapsulates my record objects?
I'm sure I can do this; it just seems inelegant compared with pluggable
brains.
Furthermore, the base Record class seems to be compiled C++. Is any
documentation available for this class?
Thanks for your help!
More information about the Zope
mailing list