We are using REST urls to pull data direct from Civi reports into Excel for analysis purposes. Within Civi the users are restricted via granular ACLs to specific groups of contacts.
WP role permission "Edit all contacts" is off for users.
WP role permission "CiviCRM:access AJAX API" - is on for users and the user has their own API key generated.
However when we extract the data via the rest url, it gives the error "API permission check failed for ReportTemplate/getrows call; insufficient permission: requires administer CiviCRM"
REST url looks as follows:
We can get around the "requires administer CiviCRM" by adding a block to civicrm/CRM/Core/DAO/permissions.php as follows:
$permissions['report_template'] = array( 'getrows' => array( 'access CiviCRM', 'access AJAX API', ), );
But that doesn’t respect the ACL group permissions – is there any way to limit it to just the data the user should normally be able to see? We are stuck with all records or no records.