Skip to content

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.

  1. '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! 😂 🤦

  2. '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. 😉

  3. 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

Screen_Shot_2017-06-14_at_16.24.45

cannot edit and current users comment

Screen_Shot_2017-06-14_at_16.25.04

can edit and not current users comment

Screen_Shot_2017-06-14_at_16.25.28

can edit and current users comment

Screen_Shot_2017-06-14_at_16.25.17

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Luke "Jared" Bennett

Merge request reports