Skip to content

Commit

Permalink
Standardise handling of administer Multiple Organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Mar 12, 2021
1 parent 7b11eac commit 6174513
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CRM/Core/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,8 @@ public static function basicPermissions($all = FALSE, $descriptions = FALSE) {
*/
public static function assembleBasicPermissions($all = FALSE, $descriptions = FALSE) {
$config = CRM_Core_Config::singleton();
$prefix = ts('CiviCRM') . ': ';
$permissions = self::getCorePermissions();

if (self::isMultisiteEnabled()) {
$permissions['administer Multiple Organizations'] = [$prefix . ts('administer Multiple Organizations')];
}

if (!$descriptions) {
foreach ($permissions as $name => $attr) {
$permissions[$name] = array_shift($attr);
Expand Down Expand Up @@ -909,6 +904,12 @@ public static function getCorePermissions() {
'description' => ts('Permit altering all restricted data options'),
],
];
if (self::isMultisiteEnabled()) {
$permissions['administer Multiple Organizations'] = [
'label' => $prefix . ts('administer Multiple Organizations'),
'description' => ts('Administer multiple organizations. In practice this allows editing the group organization link')
];
}
foreach (self::getImpliedPermissions() as $name => $includes) {
foreach ($includes as $permission) {
$permissions[$name][] = $permissions[$permission];
Expand Down

0 comments on commit 6174513

Please sign in to comment.