Local Roles and Acquisition
I am developing the security model for a ZODB-based document management Product (with a capital P). I am only using two primary local roles: 'Viewer' and 'Owner.' Because I wish to mimic the security model in a Linux/UNIX environment, I would like to grant everyone at least the 'Viewer' local role on the root of the folder/document tree, but have the option to lock down particular folders at a lower point in the tree. For example: Home (Everyone = 'Viewer') | -------------------------- | | Joe's stuff Sam's stuff (Joe = 'Owner') (Sam = 'Owner') In this situation, I do not wish for local roles to be acquired from above. In other words, I don't want Joe to acquire the local role of 'Viewer' when attempting to look at Sam's stuff. Because Zope makes the bold assertion that security should always get more permissive the deeper one traverses the object hierarchy, is there no way to do this short of hacking the 'getRolesInContext()' method? I have no interest in tweaking the permission-to-role grid on every particular folder and document, as this system will contain an indefinite depth of folders and a large volume of documents (hundreds of thousands). Thanks! Nathaniel Wingfield
On Tue, 2003-09-09 at 07:59, nwingfield@che-llp.com wrote:
In this situation, I do not wish for local roles to be acquired from above. In other words, I don't want Joe to acquire the local role of 'Viewer' when attempting to look at Sam's stuff.
OK. That's easy enough to specify.
Because Zope makes the bold assertion that security should always get more permissive the deeper one traverses the object hierarchy,
It does? Maybe we have different definitions of "deeper" but I think that standard practice is exactly the opposite of what you describe.
is there no way to do this short of hacking the 'getRolesInContext()' method?
Sure. Use security assertions in your product code to limit viewing-related privileges to owner and manager by default. Unless I'm grossly misunderstanding the question, you should be able to accomplish everything you need right in your product code. Check out this link for more info on security assertions. http://zope.org/Members/mcdonc/PDG/chap5zdg.stx HTH, Dylan
nwingfield@che-llp.com wrote at 2003-9-9 10:59 -0400:
... In this situation, I do not wish for local roles to be acquired from above. In other words, I don't want Joe to acquire the local role of 'Viewer' when attempting to look at Sam's stuff.
Zope (as it is now) does not help you with your wish... You need to change it. Dieter
participants (3)
-
Dieter Maurer -
Dylan Reinhardt -
nwingfield@che-llp.com