CustomGroup - change admin permission to 'administer CiviCRM data'
authorColeman Watts <coleman@civicrm.org>
Mon, 12 Jul 2021 16:02:24 +0000 (12:02 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 12 Jul 2021 16:02:24 +0000 (12:02 -0400)
This permission is a subset of 'administer CiviCRM' and is more precise,
allowing finer-grained admin permissions.

CRM/Core/Permission.php

index 64282d84bd7b23010fb86b6353d93bb80e012ce4..ca50dc4ea6783fadd125babc6eac081608191cae 100644 (file)
@@ -211,8 +211,6 @@ class CRM_Core_Permission {
    * @return bool
    */
   public static function customGroupAdmin() {
-    $admin = FALSE;
-
     // check if user has all powerful permission
     // or administer civicrm permission (CRM-1905)
     if (self::check('access all custom data')) {
@@ -226,7 +224,7 @@ class CRM_Core_Permission {
       return TRUE;
     }
 
-    if (self::check('administer CiviCRM')) {
+    if (self::check('administer CiviCRM data')) {
       return TRUE;
     }