Skip to content
Snippets Groups Projects
Commit 46c91013 authored by Eileen's avatar Eileen
Browse files

CRM-13901 suppress membership dashboard for acl users

parent f598dc5f
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,16 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page {
*
*/
function preProcess() {
//CRM-13901 don't show dashboard to contacts with limited view writes & it does not relect
//what they have access to
//@todo implement acls on dashboard querys (preferably via api to enhance that at the same time)
if(!CRM_Core_Permission::check(array('view all contacts', 'edit all contacts'))) {
$this->showMembershipSummary = FALSE;
$this->assign('membershipSummary', FALSE);
return;
}
$this->assign('membershipSummary', TRUE);
CRM_Utils_System::setTitle(ts('CiviMember'));
$membershipSummary = array();
$preMonth = date("Y-m-d", mktime(0, 0, 0, date("m") - 1, 01, date("Y")));
......
......@@ -24,6 +24,7 @@
+--------------------------------------------------------------------+
*}
{* CiviMember DashBoard (launch page) *}
{if $membershipSummary}
<h3>{ts}Membership Summary{/ts} {help id="id-member-intro"}</h3>
<table class="report">
<tr class="columnheader-dark">
......@@ -250,7 +251,7 @@
Primary member counts (those who "own" the membership rather than receiving via relationship) are in [brackets].
</td></tr>
</table>
{/if}
<div class="spacer"></div>
{if $rows}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment