enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
200 stars 34 forks source link

permissions update for published nodes #10420

Closed vbradnitski closed 5 months ago

vbradnitski commented 6 months ago

We need a way for a smooth permission change of published nodes without of republishing it. Steps to poc:

To investigate:

sigdestad commented 6 months ago

@vbradnitski - I believe the above spec is not reflecting what we really want. Basically, when permissions are changed in one brach, all other branches must instantly reflect the same permissions for the same item. A solution might be to drop the "inherit permissions" flag in the data, and rather just propagate effective permissions on each item.

We can implement the inheritance feeling as a UI feature instead, if a permission line is the same as its parent, show it as grey.

This way, an editor can work in draft mode, change permissions in the tree, and permissions for all affected items are instantly updated across all branches. Should permissions be updated in the master brach, the same permissions will instantly be applied to drafts. A potential solution is simply to store permissions outside of versions, in a new nodeindex maybe?

rymsha commented 6 months ago

Redo inheritPermissions - is a much bigger task (including migration of blobs). Besides algorithm described does not take into account that draft tree and master tree might be different.

We should stick to plan where we first try to modify as little code as possible. Description does not cover important detail - modify latest draft versions with new permissions. This is the first step. In the algorithm.