diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-07-04 02:20:02 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-07-21 22:35:25 +0300 |
commit | d6dab4dbcca61684c15f46976f0cfd9443436637 (patch) | |
tree | 991c4d75bf34044e77827df9bbcac1bdbc5e0bda /app | |
parent | 1f093bcda5cc848d5031f80ecc66f17da3a13aa9 (diff) |
IssueNotesRefactor: Show note actions dropdown for logged in users only.
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/notes/components/issue_note_actions.vue | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/components/issue_note_actions.vue b/app/assets/javascripts/notes/components/issue_note_actions.vue index f95686497f5..b26861a1386 100644 --- a/app/assets/javascripts/notes/components/issue_note_actions.vue +++ b/app/assets/javascripts/notes/components/issue_note_actions.vue @@ -42,6 +42,11 @@ export default { emojiSmiley, }; }, + computed: { + shouldShowActionsDropdown() { + return window.gon.current_user_id && (this.canEdit || this.canReportAsAbuse); + }, + }, }; </script> @@ -71,7 +76,9 @@ export default { v-html="emojiSmile" class="link-highlight award-control-icon-super-positive"></span> </a> - <div class="dropdown more-actions"> + <div + v-if="shouldShowActionsDropdown" + class="dropdown more-actions"> <button type="button" title="More actions" |