From 135367a61b21afe17c174851fa0a68fd0d1ddf4a Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 14 Oct 2016 15:24:13 +0100 Subject: [PATCH] CRM-12645 fix regression in previous refactor --- CRM/Contact/BAO/Contact/Permission.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact/Permission.php b/CRM/Contact/BAO/Contact/Permission.php index bbdc30ea2c..0112b38a06 100644 --- a/CRM/Contact/BAO/Contact/Permission.php +++ b/CRM/Contact/BAO/Contact/Permission.php @@ -140,8 +140,8 @@ WHERE contact_id IN ({$contact_id_list}) $contactID = CRM_Core_Session::getLoggedInContactID(); // first: check if contact is trying to view own contact - if ($type == CRM_Core_Permission::VIEW && CRM_Core_Permission::check('view my contact') - || $type == CRM_Core_Permission::EDIT && CRM_Core_Permission::check('edit my contact') + if ($contactID == $id && ($type == CRM_Core_Permission::VIEW && CRM_Core_Permission::check('view my contact') + || $type == CRM_Core_Permission::EDIT && CRM_Core_Permission::check('edit my contact')) ) { return TRUE; } -- 2.25.1