diff options
author | Samantha Ming <sming@gitlab.com> | 2019-09-12 07:41:19 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-12 07:41:19 +0000 |
commit | 589c8d5625f64edf4dfaf9ddf1f9f4b2fe7efb32 (patch) | |
tree | 45bf0e41e0b754f378b654b59820f23702e8df56 /app/assets | |
parent | 42b8e6838e8d63dcad7641a6164d178e9e09262a (diff) | |
download | gitlab-ce-589c8d5625f64edf4dfaf9ddf1f9f4b2fe7efb32.tar.gz |
Hide resolve thread button from guest
- Show if user can_resolve all of the notes
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/notes/components/discussion_actions.vue | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/components/discussion_actions.vue b/app/assets/javascripts/notes/components/discussion_actions.vue index edab750b572..e3be91a4966 100644 --- a/app/assets/javascripts/notes/components/discussion_actions.vue +++ b/app/assets/javascripts/notes/components/discussion_actions.vue @@ -35,6 +35,13 @@ export default { required: true, }, }, + computed: { + userCanResolveDiscussion() { + return this.discussion.notes.every( + note => note.current_user && note.current_user.can_resolve, + ); + }, + }, }; </script> @@ -46,7 +53,7 @@ export default { @onClick="$emit('showReplyForm')" /> - <div class="btn-group discussion-actions" role="group"> + <div v-if="userCanResolveDiscussion" class="btn-group discussion-actions" role="group"> <div class="btn-group"> <resolve-discussion-button v-if="discussion.resolvable" |