Sending notification to Admin: use right or role?

Hello everyone,

we had a quick chat with @tmortagne recently about an important missing feature of notifications, which is the capability to send notifications to the Admins of a wiki.
Right now we have an API allowing to send notifications to specific users or groups, but we cannot say easily that we want a notification to target all admins, as we cannot rely on the XWikiAdmin group.

So when discussing this @tmortagne proposed to provide an API allowing to send notification to all people satisfying to a right condition, quoting him:

we could indicate a target right and entity and all users having this right would receive the notification

I personally find that weird to use a right as a role for such API, so I was more thinking about a configuration of the wiki allowing to specify which group should be the admin group of the wiki.
Pretty much like the owner of the wiki, but containing a group instead of a single user.

Advantage of Thomas’ solution is that it’s more standard and can be used in more UC: you could use the API to send notifications for all people having Delete right on a space for example.

To be honest I don’t see much advantage of my solution since it more or less replicates the Admin right, but from a conceptual point of view I find it a bit weird the way we mix rights and role there. [Actually the more and more I think about it, the less and less it feels weird, given how rights are applied on xwiki… let’s still post this.]

WDYT? any other idea for such API?