Only show 'Edit comment'/'Report as abuse' when user has perms/isnt current_user
What does this MR do?
@DouweM caught a couple mistakes of missing a couple of conditions for the new notes actions dropdown.
This corrects those cases.
-
'Edit comment' should not be shown to users the do not have permission to... edit the comment. No idea how this happened, I wrote this before my concussion too!
😂 🤦 -
'Report as abuse' should not be shown to the user that authored that comment. I didn't even think about this so no wonder I missed it.
😉 -
Divider should only show when more than 1 item is shown.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
cannot edit and not current users comment
cannot edit and current users comment
can edit and not current users comment
can edit and current users comment
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Edited by Luke "Jared" Bennett