`Assign yourself` visible on issue sidebar even if the user has not permission to do so
Summary
Lately I noticed that on the issues sidebar, when the issue doesn't have an assignee, the Assign yourself button is present even if. the user cannot actually set the assignee.
This is only a visualization bug since the backend correctly prevents the assignee to change.
Steps to reproduce
- Log in with a user that doesn't have any sort of permission on the GitLab project, for example, like a contributor
- Find an issue that is not assigned to anyone
- The
Assign yourselfbutton should be visible on the sidebar
Example Project
The GitLab project works out perfectly as an example project.
What is the current bug behavior?
The Assign yourself is visible on the issue sidebar even if the user has no rights to admin the issue.
What is the expected correct behavior?
The Assign yourself button should not be visible on the issue sidebar when the user has no rights to admin the issue.
Relevant logs and/or screenshots
A screenshot of the problem can be found on the summary of this issue.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
