Skip to content

Change warning text when linking issue as a Guest in another project

What does this MR do and why?

Background

When the user has at least Reporter permission in the current project, that user can link other issues to the issue of the current project.

But an issue cannot be linked when the user is the Guest of the project, this error is displayed as 404, it should be 403 with a separate error message.

Corresponding documentation: https://docs.gitlab.com/ee/user/project/issues/related_issues.html#add-a-linked-issue

Resolves #325570 (closed) #2515(in jihulab)

Changed from

No matching issue found. Make sure that you are adding a valid issue URL.

to

Couldn't link issue. You must have at least the Reporter role in both projects.

Screenshots or screen recordings

Before

image

After

image

How to set up and validate locally

  1. Create an internal project.
  2. Create an public issue as Issueprivate_issue
  3. Add a MemberA as Guest.
  4. Create a private project from MemberA as Projectprivate_project
  5. Create an issue in Projectprivate_project from MemberA.
  6. Link Issueprivate_issue to issue created in above step
  7. It will block you because memberA can't add the linked to record in the Issueprivate_issue

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

/cc @daveliu

Edited by LXY

Merge request reports