diff --git a/deleterelationshipperm.php b/deleterelationshipperm.php index c2436f1..41bae74 100644 --- a/deleterelationshipperm.php +++ b/deleterelationshipperm.php @@ -155,7 +155,7 @@ function deleterelationshipperm_civicrm_links($op, $objectName, $objectId, &$lin if ($op == 'relationship.selector.row' && $objectName == 'Relationship') { if (!CRM_Core_Permission::check('delete relationships')) { foreach ($links as $key => $link) { - if ($link['name'] == 'Delete') { + if (in_array($link['name'], ['Delete', 'Disable'])) { unset($links[$key]); } } @@ -194,7 +194,7 @@ function _deleterelationshipperm_civicrm_check_permission($errorType = NULL) { if (CRM_Core_Permission::check('delete relationships')) { return FALSE; } - $message = ts('You do not have the necessary permission to delete this relationship.'); + $message = ts('You do not have permission to delete relationships. Please speak to an administrator..'); if ($errorType == 'exception') { throw new API_Exception($message); }