Update work items links permissions
What does this MR do and why?
When linking epic work items, we need to check whether the related_epics
licensed feature flag is enabled in order to allow the admin_work_item_link
policy.
Related to: #451457 (closed)
How to set up and validate locally
-
To test this locally, you need to enable work items at group level. This can be done by enabling the
namespace_level_work_items
feature flag. -
Checkout
master
branch, and log in as any user who is not a guest in a group (developer, maintainer, owner or admin). I used the root user for this step. -
Visit the group's Epics page and try to create a new Epic (You should see a modal when you click on
New Epic
) -
Log in as a user who is a guest in your group
-
Navigate to the work items page for the group. For example, (http://127.0.0.1:3000/groups/flightjs/-/work_items)
-
Click on the newly created Epic/Work item
-
As guest on master, you will be able to see the button to Add linked items. This is not expected, as linking of Epics is only allowed when the instance has a licence.
-
Checkout this MR's branch (
jj-451457-work-item-relation-permissions-b
) -
When your local instance does not have a licence you should not see the Add button (whether logged in as guest or admin)
-
When your local instance has a valid license, the 'Add' button should again be visible