Skip to content

Show Ancestry items not available if user has no permission

What does this MR do and why?

Show Ancestry items not available if user has no permission to view parent Epic work items. When an ancestor item is confidential and if user has no access to parent namespace, then the item is not sent to

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
Multiple ancestors Screenshot 2024-07-10 at 3.39.34 PM.png Screenshot 2024-07-23 at 9.36.20 PM.png
Single ancestor Screenshot 2024-07-10 at 3.39.34 PM.png Screenshot 2024-07-23 at 9.36.49 PM.png

How to set up and validate locally

Prerequisites:

  1. Enable the OKRs feature as mentioned in the OKRs docs (e.g. ::Feature.enabled?(:okrs_mvc, Project.find(<PROJECT_ID>)) and the namespace must have Ultimate plan).
  2. Enable Epic work items
    1. Feature.enable(:work_item_epics_rollout)
    2. Feature.enable(:work_item_epics)

Setup for validation:

  1. Login with root user
  2. Create a hierarchy like Group A > Group B > Project C
  3. Add User A in Group B and Project C with any role but do not give access to the Group A
  4. Create Epic work items in each group (Change the URL from http://gdk.test:3000/animal-zoo/land/-/epics > http://gdk.test:3000/animal-zoo/land/microorganisms/-/work_items for creating Epic work items)
  5. Mark Group A Epic work item as confidential
  6. Create an Issue Issue C in Project C and set a Epic work item from Group B which has parent in Group A
  7. Add Task C under the same issue

Steps to verify at Group level:

  1. Login with User A
  2. Open an Epic from Group B which has a parent in Group A
  3. Check if the ancestor widget is showing Ancestry item not available in the bread crumb

Steps to verify at Project level:

  1. Login with User A
  2. Go to Project C > Issue C
  3. Open Task C
  4. Check if the ancestor widget is showing Ancestry item not available in the bread crumb

Related to #430141 (closed)

Edited by Rajan Mistry

Merge request reports

Loading