While implementing a new feature for a customer, I stumbled upon an interesting issue: After creating a new permission (Adding it via ZCML & configuring its default values with rolemap.xml), I noticed this new permission is not listed, on manage_access, for non-folderish content types (i.e: File, Image).
Also, If I try, via code, to access rolesOfPermission passing the new permission, I will get a ValueError (invalid permission) -- and the same happens if I try to set roles to the permission with manage_permission.
I would like to know where the list of available permissions for non-folderish content(inheriting from OFS.Item, not from OFS.Folder) is defined (as I want to add my permission to this list).
Ericof via Plone Community wrote at 2022-2-3 23:20 +0000:
While implementing a new feature for a customer, I stumbled upon an interesting issue: After creating a new permission (Adding it via ZCML & configuring its default values with rolemap.xml), I noticed this new permission is not listed, on manage_access, for non-folderish content types (i.e: File, Image).
Also, If I try, via code, to access rolesOfPermission passing the new permission, I will get a ValueError (invalid permission) -- and the same happens if I try to set roles to the permission with manage_permission.
Are you aware that Zope sees the permission's title not its id?