Implement 'super permissions' as described by @totten
authoreileen <emcnaughton@wikimedia.org>
Thu, 6 Feb 2020 04:07:11 +0000 (17:07 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 8 Sep 2020 00:14:26 +0000 (12:14 +1200)
commit755a18357bf04fb264b6a1bfad316d8d4f8328bf
tree422dda6802f2b0bcbf18146eab9add897d657b8e
parentd2ef2107834a4a541a510c8360c4953b4a1dceca
Implement 'super permissions' as described by @totten

This picks up on an idea Tim has pushed several times - ie that instead of giving out 'Administer CiviCRM' willy nilly
we could deprioritise it in favour of 2 more granular permission bundles - ie Administer CiviCRM data & administe CiviCRM system.

This allows us to make some permissions more 'locked away' without endlessly adding new 'administer Payment Processors'
because we've realised not everyone who can create profiles needs to be able to see payment processor credentials.

It also allows us to make system checks less broadly visible where they are not appropriate.

Note that to proceed with this we would need to go through all places that check Administer CiviCRM & put in one
or both of the 2 new permissions. Having Administer CiviCRM implicitly includes anything granted to the existing
permissions so the implementation is smooth-ish there. However, I can imagine we would need a hook allowing people
to categorise themselves or we would find ourselves litigating all sorts
CRM/Core/Permission.php
CRM/Core/xml/Menu/Admin.xml
CRM/Event/Form/ManageEvent.php
CRM/Event/Form/ManageEvent/TabHeader.php
CRM/Event/Form/Registration/Register.php
CRM/Event/Page/ManageEvent.php
CRM/Grant/Page/DashBoard.php
CRM/UF/Form/Inline/Preview.php
CRM/Utils/Check.php
tests/phpunit/CRM/Core/Permission/BaseTest.php