Edit file in project with no Merge Requests, allows creating an MR and then fails

Summary

Editing a file on a new branch allows one to select that an MR should be created. This happens even if MR's are disabled for the project (I suppose it also happens if the user does not have permission to create MR's).

Steps to reproduce

  1. Create project, disable MR's
  2. Add file to project
  3. Edit the file in Gitlab UI (not Web IDE), name a new branch and chose "Create MR"
  4. Observe a 404 "The page could not be found or you don't have permission to view it."

Example Project

https://gitlab.com/LordMike/disabled-merge-requests-test

When I edit the file following above steps, the bug appears.

What is the current bug behavior?

  • It's possible to request a new MR for a project without MR capability

What is the expected correct behavior?

  • The option should not appear, or appear but be greyed out

Relevant logs and/or screenshots

image

Output of checks

This bug happens on GitLab.com

Edited Sep 18, 2018 by Michael Bisbjerg
Assignee Loading
Time tracking Loading