From 256e40af1261951007f4bb72ce24f74595367e52 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Wed, 26 Mar 2014 16:12:23 -0700 Subject: [PATCH] CRM-14395 - Prevent Edit button from being displayed on contact summary if user does not have edit permission on that contact. It was incorrectly showing for all contacts when user role had edit my contact permission. ---------------------------------------- * CRM-14395: Edit button is displayed for users who do NOT have permission to edit the contact http://issues.civicrm.org/jira/browse/CRM-14395 --- templates/CRM/Contact/Page/View/Summary.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Contact/Page/View/Summary.tpl b/templates/CRM/Contact/Page/View/Summary.tpl index 20bf7f7036..398ac5eeaa 100644 --- a/templates/CRM/Contact/Page/View/Summary.tpl +++ b/templates/CRM/Contact/Page/View/Summary.tpl @@ -54,8 +54,8 @@ {include file="CRM/Contact/Page/Inline/Actions.tpl"} {/if} - {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. *} - {if $permission EQ 'edit' || call_user_func(array('CRM_Core_Permission','check'), 'edit my contact')} + {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. CRM_Contact_Page_View::checkUserPermission handles this and assigns $permission true as needed. *} + {if $permission EQ 'edit'}
  • {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"} -- 2.25.1