Dismissal comments can be edited by other users
Closing summary
closedwill not do
This is behaving as expected, "Users with owner
or maintainer
access roles can edit other users' comments. Users with developer
role cannot edit other users' comments.
The policy
permission is called admin_note
(src).
Summary
Comments in a vulnerability page can be edited by any user with access to the project.
The "Save" button also never finish the "working" animation.
Steps to reproduce
- Dismiss a vulnerability.
- Open the vulnerability and leave a comment.
- Sign-in as another user, and edit the comment you left on the step before.
- The "save" button might never display when the operation is complete. Reload the page to see the save comment anyway.
Example Project
What is the current bug behavior?
Comment is editable by any user with access to the project.
What is the expected correct behavior?
Comment is only editable by the author.
Relevant logs and/or screenshots
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)