// CRM-11480, CRM-11682
// Preload libraries required by the "Questions" tab
+ $this->assign('perm', (bool) CRM_Core_Permission::check('administer CiviCRM'));
CRM_UF_Page_ProfileEditor::registerProfileScripts();
CRM_UF_Page_ProfileEditor::registerSchemas(['IndividualModel', 'ActivityModel']);
$title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
}
- // CRM-16776 - show edit/copy/create buttons on Profiles Tab if user has required permission.
- if (CRM_Core_Permission::check('administer CiviCRM')) {
- $this->assign('perm', TRUE);
- }
+ $this->assign('perm', (bool) CRM_Core_Permission::check('administer CiviCRM'));
// set up tabs
CRM_Contribute_Form_ContributionPage_TabHeader::build($this);
if (CRM_Core_Permission::check($checkPermission) || !empty($ufCreate) || !empty($ufEdit)) {
$this->assign('perm', TRUE);
}
+ else {
+ $this->assign('perm', FALSE);
+ }
// also set up tabs
CRM_Event_Form_ManageEvent_TabHeader::build($this);