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
After
How to set up and validate locally
- Create an internal project.
- Create an public issue as Issue
private_issue
- Add a Member
A
as Guest. - Create a private project from Member
A
as Projectprivate_project
- Create an issue in Project
private_project
from MemberA
. - Link Issue
private_issue
to issue created in above step - It will block you because member
A
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.
-
I have evaluated the MR acceptance checklist for this MR.
/cc @daveliu
Edited by LXY