Improve error message when trying to fork a project into a group with insufficient permissions
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=416172) </details> <!--IssueSummary end--> ### Summary In the issue [Cannot fork into a group where a user has Developer permissions](https://gitlab.com/gitlab-org/gitlab/-/issues/413440#note_1429784216), it was clarified that we changed the behavior of fork functionality on purpose, and from now on, a user cannot fork project into a group in which this user has Developer permissions. At least Maintainer permissions are required for that. ### Steps to reproduce Same as in the issue https://gitlab.com/gitlab-org/gitlab/-/issues/413440. ### What is the current *bug* behavior? The error message shown when trying to fork is not clear: `An error occurred while forking the project. Please try again.`. ### What is the expected *correct* behavior? We need to show a proper and useful error message for such cases. We have a better error in the browser console: `is not allowed to import projects`, but it's still not perfect. It would be great if we can say something like: `You are not allowed to fork a project into this group because of insufficient permissions. See doc-page for details.` ### Relevant logs and/or screenshots The errors are quoted above.
issue