X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FCustomValue.php;h=72ef10ab59d82b4d209a10e14e08654d369218ac;hb=a996d8adea23f7db3eedec1e8e9fdea08d418ed8;hp=7c2a5a790b040fdff9bbfb1b918d1a2b99bcadf9;hpb=dca68049c61202587a37ca3b8e247d2409c0040e;p=civicrm-core.git diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index 7c2a5a790b..72ef10ab59 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -340,7 +340,8 @@ function civicrm_api3_custom_value_gettree($params) { } } } - $tree = CRM_Core_BAO_CustomGroup::getTree($treeParams['entityType'], $toReturn, $params['entity_id'], NULL, $treeParams['subTypes'], $treeParams['subName'], TRUE, NULL, FALSE, CRM_Utils_Array::value('check_permissions', $params, TRUE)); + $permission = empty($params['check_permissions']) ? FALSE : CRM_Core_Permission::VIEW; + $tree = CRM_Core_BAO_CustomGroup::getTree($treeParams['entityType'], $toReturn, $params['entity_id'], NULL, $treeParams['subTypes'], $treeParams['subName'], TRUE, NULL, FALSE, $permission); unset($tree['info']); $result = []; foreach ($tree as $group) {