Validate if project labels can be created in label creation from merge request
It seems, when creating a merge request on some projects, I am able to assign labels to an MR but I am unauthorized to create labels (so far so good). Yet, the MR creation dialog presents the option to create labels to me, and even accepts clicking "Create" with no error message, and leaves me wondering why the label I just created does not appear in the list of existing labels.
Steps to reproduce
One needs to be able to create merge requests to a project, but not have administration rights to that project.
(Given that I don't have admin rights on the project, I cannot look up the project's exact settings …)
From there on,
- fork the project
- push to the fork
- open a merge request to the origin project
- open the label drop down menu
- click 'Create project label'
- assign a text to the label
- pick a color
- click create
- observe that the label was not created
(the one I used for https://gitlab.com/gitlab-org/gitlab-ee/issues/7293 )
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report): Well, that would require me to create a second account, such that I can create the project and then still have an account with insufficient rights …
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version): I appreciate that, but would prefer to go on with my regular work instead of fixing up your project. Sorry for the inconvenience.
What is the current bug behavior?
I can imagine various possible ways:
- Grey out the 'Create project label' with a tooltip "you don't have rights to create labels"
- Show some kind of error message after clicking 'create', E.g. at the top of the page like some other gitlab errors do already. Maybe red/orange background and a text "Label could not be created"?
What is the expected correct behavior?
- At least a warning or error message. Clicking create should not go fine, just like one would expect when a label actually got created.
Relevant logs and/or screenshots
No access to logs, but I guess our on site support at cern.ch should have access. In the creation of https://gitlab.cern.ch/lhcb/LHCb/merge_requests/1452 (2018-08-17 17:12 CEST) I probably went through the cycle a few times.
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com) None - see above.
Results of GitLab environment info