Skip to content

Refactor User custom roles ability check and preloader

Jarka Košanová requested to merge refactor-custom-roles into master

What does this MR do and why?

It fefactors User custom roles ability check and Preloader query.

  • it replaces read_code_for? and read_vulnerability_for? methods with one general method that can be used for any project-related permission check
  • it makes the preloader query more general by getting all customizable permissions and adding them to the query
  • it also refactors ProjetPolicy specs related to custom roles

This will simplify not only the code but also new custom role abilities implementation.

Database

The query does not change at all. Only the way it is built was changed.

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jarka Košanová

Merge request reports

Loading