From bb36d17afa8cdfdbbdd44671665e457e88fe1f1c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 16 Jun 2015 14:36:28 -0400 Subject: [PATCH] CRM-16512 - Hide dashboard related contact table for users without 'view my contact' --- CRM/Contact/Page/View/UserDashBoard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Page/View/UserDashBoard.php b/CRM/Contact/Page/View/UserDashBoard.php index fb3cf35e79..f10bb04ae3 100644 --- a/CRM/Contact/Page/View/UserDashBoard.php +++ b/CRM/Contact/Page/View/UserDashBoard.php @@ -146,7 +146,8 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { } } - if (!empty($this->_userOptions['Permissioned Orgs'])) { + // CRM-16512 - Hide related contact table if user lacks permission to view self + if (!empty($this->_userOptions['Permissioned Orgs']) && CRM_Core_Permission::check('view my contact')) { $dashboardElements[] = array( 'class' => 'crm-dashboard-permissionedOrgs', 'templatePath' => 'CRM/Contact/Page/View/RelationshipSelector.tpl', -- 2.25.1