- LEFT JOIN ... ACT_RU_AUTHORIZATION is changed to INNER JOIN ... ACT_RU_AUTHORIZATION
- The left join is only needed because CMMN tasks are not covered by permissions. When CMMN is disabled, an inner join can be made.
- CASE_EXECUTION_ID_ IS NULL check is removed in WHERE clause
- When no case tasks are expected in the results, we don't need to filter the join with the authorization table on the case execution attributes
- Documentation of cmmnEnabled flag is extended for this case