Draft: Make issue sidebar attributes editable within Group Issue boards based on the project permissions
What does this MR do and why?
The edit button for issue cards on Group issue boards are not visible for Reporter+ roles as the adminIssue
passed from app/views/shared/boards/_show.html.haml#L19 remains false when the cards are flipped. In this MR, we are getting the adminIssue
permission each time the sidebar is opened using the BoardListsEE
query and then passing it to sidebar components. This will enable the Reporter+ roles to edit issue from the group issue boards if they are member of the project.
Screenshots or screen recordings
A user with Developer access is added to Gitlab Test project but not in the group Gitlab Org and other project Gitlab Shell. Before, the user was not able to edit the issue details while now user will be able to edit the details.
Before | After |
---|---|
Screen_Recording_2023-06-08_at_7.51.30_PM | Screen_Recording_2023-06-08_at_7.52.53_PM |
How to set up and validate locally
- Login with the Administrator
- Create a Group A
- Create Project A and Project B in the Group A
- Create few issues in both the projects
- Add a user to the Project A as a Reporter or any further role
- Make sure the user is not part of the Project A's Group A
- Login with a user other than Administrator
- Go to the Group A > Issue boards
- Click on a issue 1 of Project A in which the user is a member
- The edit button for all settings should be available for the user
- Click on any other issue 2 of Project B in which the user is not a member
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.
Related to #397018