Reputation: 146
I am trying to setup some group maintained folders that should not be seen by the other groups. Currently, I achieve that by un-clicking the "Inherit permissions from higher levels" check-box in the @@sharing tab, but I would like to automate this.
I could not find anything about this in the documentation or googling. After searching around the eggs directory I found some interesting things about 'ac_inherited_permissions' but nothing jumped out at me as my solution.
I'd like to do something like obj.inherited_permissions = False, or call whichever function I need to.
Any ideas?
Upvotes: 5
Views: 496
Reputation: 1121306
The sharing tab only affects local roles. These usually are inherited from parents (acquired), but you can explicitly block these by setting __ac_local_roles_block__
to True
on an object.
Make sure, however, you set this on the unwrapped object (no acquisition context):
from Acquisition import aq_base
aq_base(object).__ac_local_roles_block__ = True
Upvotes: 5