Skip to content

Add models and initial ability for admin related custom roles

Jarka Košanová requested to merge 501547-admin-cr-models into master

What does this MR do and why?

We want to introduce custom permissions that allow users to visit certain admin areas. This is the preparation for this.

Right now, we have MemberRole table associated with Member table, while Member can (but don't have to) have member_role assigned. The Member is always related to a group or project.

For admin-related permissions, there is no relevant membership. So we need to store the association elsewhere. I am introducing a new model Users::UserMemberRole where we'll store that association.

The first custom ability for admin role is added in this MR to illustrate the intended usage but is not working yet, there are no visible changes.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #501547 (closed)

Edited by Jarka Košanová

Merge request reports

Loading