I am trying to limit access to reports using acl/groups as mentioned in the userguide :
https://docs.civicrm.org/user/en/4.7/reporting/set-up/#define-report-settings
However, the field to set this does not appear.
Is there something i have to configure to make this appear? Or does this functionality no longer exist?
If relevant I am already using acl for controlling access to custom data sets.
Running civicrm 4.7.17 on wordpress 4.7.3 using php 7.0.15
UPDATE 1:
looking through the code it seems that the following code (found in /wp-content/plugins/civicrm/civicrm/CRM/Report/Form/instance.php) is causing it not to appear:
if (function_exists('user_roles')) {
$user_roles_array = user_roles();
foreach ($user_roles_array as $key => $value) {
$user_roles[$value] = $value;
}
$grouprole = &$form->addElement('advmultiselect',
'grouprole',
ts('ACL Group/Role'),
$user_roles,
array(
'size' => 5,
'style' => 'width:240px',
'class' => 'advmultiselect',
)
);
$grouprole->setButtonAttributes('add', array('value' => ts('Add >>')));
$grouprole->setButtonAttributes('remove', array('value' => ts('<< Remove')));
}
For some reason the 'user_roles' function does not exist.
So when the below code is run (found in /wp-content/uploads/civicrm/templates_c/en_US/%%48/48E/48E22AAC%%Instance.tpl.php) the php returns nothing:
<tr class="crm-report-instanceForm-form-block-role">
<td class="report-label" width="20%"><?php echo $this->_tpl_vars['form']['grouprole']['label']; ?>
</td>
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['form']['grouprole']['html'])) ? $this->_run_mod_handler('crmAddClass', true, $_tmp, 'huge') : smarty_modifier_crmAddClass($_tmp, 'huge')); ?>
</td>
</tr>
UPDATE 2:
looking a little higher in instance.php it looks like this might not be for wordpress even though this section still runs:
if ($config->userFramework != 'Joomla' ||
$config->userFramework != 'WordPress'
)
still unsure of why 'grouprole' doesnt exist for the other code though:
<tr class="crm-report-instanceForm-form-block-role">
<td class="report-label" width="20%"><?php echo $this->_tpl_vars['form']['grouprole']['label']; ?>
</td>
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['form']['grouprole']['html'])) ? $this->_run_mod_handler('crmAddClass', true, $_tmp, 'huge') : smarty_modifier_crmAddClass($_tmp, 'huge')); ?>
</td>
</tr>