From d013d45c07cba03414636fec32024a4d6e446505 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 11 Apr 2013 15:20:40 -0300 Subject: [PATCH] Update permissions.php Explain how replace and delete permissions relate --- CRM/Core/DAO/permissions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/DAO/permissions.php b/CRM/Core/DAO/permissions.php index e2cf3b2631..5112e0274f 100644 --- a/CRM/Core/DAO/permissions.php +++ b/CRM/Core/DAO/permissions.php @@ -392,6 +392,10 @@ function _civicrm_api3_permissions($entity, $action, &$params) { // Translate specific actions into their generic equivalents $snippet = substr($action, 0, 3); if ($action == 'replace' || $snippet == 'del') { + // 'Replace' is a combination of get+create+update+delete; however, the permissions + // on each of those will be tested separately at runtime. This is just a sniff-test + // based on the heuristic that 'delete' tends to be the most closesly guarded + // of the necessary permissions. $action = 'delete'; } elseif ($action == 'setvalue' || $snippet == 'upd') { -- 2.25.1