Change Request: towards explicit approvers inheritance?

Hello everyone,

I’m opening this brainstorming following the discussions on this ticket: Loading....
To sum it up a bit: right now in CR we have two mechanisms for defining the approvers. Either using a Right, or specifying explicit the approvers of a page / a CR (it is documented in https://extensions.xwiki.org/xwiki/bin/view/Extension/Application%20Change%20Request%20-%20UI/#HApprovalsmechanisms)

The idea for having both mechanism is that the Right is more dynamic and allows to define approvers through the hierarchy, using groups and all the capabilities of XWiki rights, and for me it was the moral natural way in XWiki philosophy for defining them.

Now we had a requested usecase for allowing to define the approvers specifically page by page, and ensuring that all those explicit approvers would approve, which is the reason why I developed the other mechanism.

The reason why it’s not possible right now to use the Right with a strategy for checking if all approvers approved a page is a scalability issue: the Right is defined through the hierarchy of the pages of the CR. So I should basically iterate over all users of the wiki to check for each of them if they have the approver right for the CR, and then check if they had approved. It just doesn’t scale.

Now the request on CRAPP-290 is basically to be able to use this strategy to check if all approvers approved a page, and at the same time to be able to define those approvers through the hierarchy.

I haven’t implemented the capability for explicit approvers to be defined in the hierarchy because to me it was the exact usecase for using the Right. But I do understand the need of checking if all approvers have approved.
So I’m starting to wonder if I shouldn’t implement that hierarchy support for explicit approvers. Or I’m wondering if there isn’t another option I haven’t considered yet?

Any opinion?