Only show Merge Request button when user can create a MR
What does this MR do?
It adds another check if the user is allowed to create a Merge Request, if they are not, the "Create Merge Request" button is not shown.
Are there points in the code the reviewer needs to double check?
As mentioned by @DouweM, users still should be able to create a Merge Request to the project they forked from. Tests to ensure this are included in this MR.
Why was this MR needed?
This fixes the 403
issue raised in gitlab-org/gitlab-ce#26055, but the 404
issue remains unresolved (if that really is an issue, see https://gitlab.com/gitlab-org/gitlab-ce/issues/26055#note_21022313).
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
gitlab-org/gitlab-ce#26055