CRM-16512 - Hide dashboard related contact table for users without 'view my contact'
authorColeman Watts <coleman@civicrm.org>
Tue, 16 Jun 2015 18:36:28 +0000 (14:36 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 16 Jun 2015 18:36:28 +0000 (14:36 -0400)
CRM/Contact/Page/View/UserDashBoard.php

index fb3cf35e79122d63feb78cea44fc3a8901cb5d24..f10bb04ae36661d2ac0ed74895c0e61a2805db03 100644 (file)
@@ -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',