Skip to content

Change permissions to set epic of an issue

What does this MR do?

To be able to assign an issue to its project's parent group epic, like discussed in #208425 (closed), we need to modify the permissions check as follows:

From

  • The user has the ability to admin_epic

To

  1. The user has the ability to admin_issue (IOWm at least a reporter role in the project)
  2. The user has the ability to read_epic (IOW, at least a guest role in the group as well as having the epics feature enabled for the group)

This MR changes permission checks in:

  • Issue#can_assign_epic?
  • Mutations::Issues::SetEpic#authorize_read_rights!
  • EE::Issues::BaseService#epic_param
  • EpicIssues::CreateService#linkable_issuables
  • EpicIssues::DestroyService#permission_to_remove_relation?
  • API::EpicIssues
    • PUT :id/(-/)epics/:epic_iid/issues/:epic_issue_id
    • POST :id/(-/)epics/:epic_iid/issues/:issue_id
    • DELETE :id/(-/)epics/:epic_iid/issues/:epic_issue_id

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #208425 (closed)

Edited by Eugenia Grieff

Merge request reports

Loading