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?
To remove permission inheritance for the folder, click Stop Inheriting Permissions. For existing users, edit the permissions of those in the current list by selecting the check boxes and clicking either Edit User Permissions or Remove User Permissions.
If inheritance is disabled at a specific level, the object, either a file or folder will not inherit permissions from its parent folders. If that object is a folder its own “children”, subfolders and files, will still inherit permissions of that folder as long as those child objects themselves have inheritance enabled.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With