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 | ||
Single ancestor |
How to set up and validate locally
Prerequisites:
- 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). - Enable Epic work items
Feature.enable(:work_item_epics_rollout)
Feature.enable(:work_item_epics)
Setup for validation:
- Login with root user
- Create a hierarchy like
Group A
>Group B
>Project C
- Add
User A
inGroup B
andProject C
with any role but do not give access to theGroup A
- 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)
- Mark
Group A
Epic work item as confidential - Create an Issue
Issue C
inProject C
and set a Epic work item fromGroup B
which has parent inGroup A
- Add
Task C
under the same issue
Steps to verify at Group level:
- Login with
User A
- Open an Epic from
Group B
which has a parent inGroup A
- Check if the ancestor widget is showing
Ancestry item not available
in the bread crumb
Steps to verify at Project level:
- Login with
User A
- Go to
Project C
>Issue C
- Open
Task C
- Check if the ancestor widget is showing
Ancestry item not available
in the bread crumb
Related to #430141 (closed)
Edited by Rajan Mistry