zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
37 stars 5 forks source link

Handle instance granular role handling #2747

Closed agalin920 closed 6 days ago

agalin920 commented 2 weeks ago

Solution to handle immediate need of applying an Instance granular role with publish: false

Required changes:

  1. Content items only get filtered if at least one granular role targets a content item. This ensures that given ONLY an instance granular role a user is still able to see all the content items.

  2. Use-permission hook now defaults zuid argument to instance zuid (argument has been unused so far) in order to check permissions.

This allows for an instance granular role to be checked and have priority over system role in the case no other entity zuid is provided

closes https://github.com/zesty-io/accounts-api/issues/269