Skip to content

Commit

Permalink
dev/core#2601 fix joomla permission regression
Browse files Browse the repository at this point in the history
This was a change we ultimately decided to, but forgot to, revert. It gave
extensions the ability to modify already-defined-permissons but
was brought out of scope of the change as it required more
consideration that simply adding the new super duper permission

In the meantime it caused a Joomla! regression
https://lab.civicrm.org/dev/core/-/issues/2601
  • Loading branch information
Your Name committed May 9, 2021
1 parent 8df81b0 commit 5bb372c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CRM/Core/Permission/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,9 @@ public function getModulePermissions($module): array {
* @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) {
Expand Down

0 comments on commit 5bb372c

Please sign in to comment.