/copy_metadata shows when it is not usable

Summary

In the comment box of a merge request that I am assigned to, BUT in a project which I am not a member of (directly or indirectly), I have the slash command /copy_metadata in the drop-down. In the merge request sidebar, I am unable to edit the issue metadata, and the command fails, but it is not nice to see it as available,

Steps to reproduce

  1. Have a project you're not a member of
  2. Find a merge request in that project you are assigned to
  3. Type /copy_metadata in the comment box

Example Project

/copy_metadata showed up in the https://gitlab.com/charts/gitlab/merge_requests/570 comment box for me. At moment of writing, I was assigned to that merge request.

What is the current bug behavior?

/copy_metadata shows up in the dropdown when typing / at the start of a line

What is the expected correct behavior?

/copy_metadata should not show up, it should only show up if you have the correct permissions.

Results of GitLab environment info

gitlab.com, 2018-11-28T10:40

Edited Nov 28, 2018 by Matthias van de Meent
Assignee Loading
Time tracking Loading