Skip to content

Draft: Make issue sidebar attributes editable within Group Issue boards based on the project permissions

Rajan Mistry requested to merge 397018-fix-edit-button-issue-board into master

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

  1. Login with the Administrator
  2. Create a Group A
  3. Create Project A and Project B in the Group A
  4. Create few issues in both the projects
  5. Add a user to the Project A as a Reporter or any further role
  6. Make sure the user is not part of the Project A's Group A
  7. Login with a user other than Administrator
  8. Go to the Group A > Issue boards
  9. Click on a issue 1 of Project A in which the user is a member
  10. The edit button for all settings should be available for the user
  11. 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.

Related to #397018

Edited by Rajan Mistry

Merge request reports