Display admin menu when user can access admin area using custom role
What does this MR do and why?
It displays admin menu when a user can access admin area using a custom role
The feature is under a feature flag (custom_ability_read_admin_dashboard
)
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
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:custom_ability_read_admin_dashboard)
- Go to rails console,
rails c
- Create a new admin member role:
mr = MemberRole.create(name: 'admin dashboard', description: 'admin area custom role', read_admin_dashboard: true)
- Assign this role to a selected user:
Users::UserMemberRole.create(member_role: mr, user: user)
- Impersonate that user
- Click Global search in left sidebar ("Search or go to")
- You can see "Admin area" item, click it
- Verify there are links under Overview in side panel
Related to #501550 (closed)
Edited by Jarka Košanová