Skip to content
Snippets Groups Projects
Commit 0d986942 authored by Eileen McNaughton's avatar Eileen McNaughton
Browse files

Permit access to template user jobs (imports)

parent c017ad4d
Branches 4.7.9-rc
Tags 4.7.9
No related merge requests found
......@@ -97,7 +97,9 @@ class CRM_Core_BAO_UserJob extends CRM_Core_DAO_UserJob implements \Civi\Core\Ho
public function addSelectWhereClause(): array {
$clauses = [];
if (!\CRM_Core_Permission::check('administer queues')) {
$clauses['created_id'] = '= ' . (int) CRM_Core_Session::getLoggedInContactID();
// @todo - the is_template should really be prefixed. We need to add support
// for that in the compiler & then this would be `{table}.is_template`
$clauses['created_id'] = '= ' . (int) CRM_Core_Session::getLoggedInContactID() . ' OR is_template = 1';
}
CRM_Utils_Hook::selectWhereClause($this, $clauses);
return $clauses;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment