When a user with `developer` access tries to duplicate a dashboard and save to master, they receive a confusing error message.

Summary

When a user with developer access tries to duplicate a dashboard and save to master, they receive a confusing error message.

Steps to reproduce

  1. Go to a project in which you are a developer, which has Metrics available.
  2. Visit the metrics dashboard (Operations -> Metrics).
  3. Click on the "Dashboard" dropdown.
  4. Click on "duplicate" dashboard.
  5. Attempt to duplicate the dashboard by saving to master.

Example Project

The monitoring demo project:

What is the current bug behavior?

The error message is confusing/irrelevant.

image

What is the expected correct behavior?

The error message should be clear, in explaining to the user, that they should have access to modifying the default branch, and they they may choose another branch.

Relevant logs and/or screenshots

2020-01-20_11.37.53

Output of checks

This bug happens on GitLab.com

Possible fixes

Possibly, an update on the error message prompting the user to creating another branch or opening a merged request is enough.

Edited by Miguel Rincon