Simplify query for preloading group custom roles
What does this MR do and why?
It simplifies the SQL query for retrieving group-related custom permissions. There is no performance improvement, just a query simplification.
The first part of union
is removed as it is redundant and already handled by the second part (now first)
Queries
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No change of functionality.
How to set up and validate locally
Create custom role(s) in Admin - Settings - Roles and Permissions and play around with assigning (group-related) permissions and making sure assigned users can access the enabled features.
Related to #421265 (closed)
Edited by Jarka Košanová