Commit d8e11c26 authored by mattwire's avatar mattwire
Browse files

If contact has view/edit all contacts they can see all groups

parent b5403b6a
......@@ -3,7 +3,6 @@ use CRM_Groupadmin_ExtensionUtil as E;
class CRM_Groupadmin_BAO_GroupAdminContact extends CRM_Groupadmin_DAO_GroupAdminContact {
/**
* @param $contactID
*
......
......@@ -135,6 +135,11 @@ function groupadmin_civicrm_entityTypes(&$entityTypes) {
}
function groupadmin_civicrm_aclGroup($type, $contactID, $tableName, &$allGroups, &$currentGroups) {
// If the contact has edit / view all permission then they can see all groups
if (CRM_Core_Permission::check('edit all contacts', $contactID) ||
(($type == CRM_Core_Permission::VIEW) && CRM_Core_Permission::check('view all contacts', $contactID))) {
return;
}
$currentGroups = CRM_Groupadmin_BAO_GroupAdminContact::getGroupAdminList($contactID);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment