reduce permissions to edit grant budget

This commit is contained in:
Jon Goldberg 2019-07-08 14:53:03 -04:00
parent 836c86c042
commit 4e3ffa7ee0
No known key found for this signature in database
GPG Key ID: C2D2247364F9DB13

View File

@ -238,3 +238,9 @@ function annualgrantbudgets_civicrm_validateForm($formName, &$fields, &$files, &
$errors = array_merge($errors, $budgetErrors);
}
}
function annualgrantbudgets_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {
// Editing the budget should be possible with just "Access CiviGrant".
$permissions['grant_budget']['create'] = array('access CiviGrant');
$permissions['grant_budget']['update'] = array('access CiviGrant');
}