X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPermission%2FBase.php;h=9b1ae5709bbcfa3486bfe22485ba5a401efe33ef;hb=f8307138bf292130a628e68f346535b398ae9b63;hp=60ffbe3c9ed6adc129811e0efbe3627e121560d2;hpb=01ed6415d6809da56a25717f249c12d19f323314;p=civicrm-core.git diff --git a/CRM/Core/Permission/Base.php b/CRM/Core/Permission/Base.php index 60ffbe3c9e..9b1ae5709b 100644 --- a/CRM/Core/Permission/Base.php +++ b/CRM/Core/Permission/Base.php @@ -75,10 +75,10 @@ class CRM_Core_Permission_Base { } /** - * Get the current permission of this user. + * Get the maximum permission of the current user with respect to _any_ contact records. * - * @return string - * the permission of the user (edit or view or null) + * @return int|string|null + * @see \CRM_Core_Permission::getPermission() */ public function getPermission() { $this->group(); @@ -393,15 +393,13 @@ class CRM_Core_Permission_Base { * in all enabled CiviCRM module extensions. * * @param bool $descriptions - * @param array $permissions * * @return array * Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions(). */ - public function getAllModulePermissions($descriptions = FALSE, &$permissions): array { - $newPermissions = []; - CRM_Utils_Hook::permission($newPermissions, $permissions); - $permissions = array_merge($permissions, $newPermissions); + public function getAllModulePermissions($descriptions = FALSE): array { + $permissions = []; + CRM_Utils_Hook::permission($permissions); if ($descriptions) { foreach ($permissions as $permission => $label) {