diff --git a/CRM/Core/BAO/UserJob.php b/CRM/Core/BAO/UserJob.php index b599505e9f63dc089f0fabd6ee8b2a80c07c74b8..c9051d0b0852d044da9142a2f06624d559153386 100644 --- a/CRM/Core/BAO/UserJob.php +++ b/CRM/Core/BAO/UserJob.php @@ -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;