Show "Invite members" link on work item only with correct permission
What does this MR do and why?
Previously, on work item view, any user could see Invite members
link in assignees dropdown. This MR fixes this behaviour to only show the link if the user has a permission to invite new members
Screenshots or screen recordings
Screenshots for the user without permission to invite members:
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
-
Enable work items feature flag:
Feature.enable(:work_items)
-
Enable the work items MVC 2 feature flag
Feature.enable(:work_items_mvc_2)
-
Open work item view
-
Click on the assignees field
-
Check if
Invite members
link is present -
Log out and log in with the user that is not a maintainer for a project.
-
Open dropdown again, you should not see
Invite members
link
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Natalia Tepluhina