Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSamantha Ming <sming@gitlab.com>2019-09-12 10:41:19 +0300
committerKushal Pandya <kushalspandya@gmail.com>2019-09-12 10:41:19 +0300
commit589c8d5625f64edf4dfaf9ddf1f9f4b2fe7efb32 (patch)
tree45bf0e41e0b754f378b654b59820f23702e8df56 /app
parent42b8e6838e8d63dcad7641a6164d178e9e09262a (diff)
Hide resolve thread button from guest
- Show if user can_resolve all of the notes
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes/components/discussion_actions.vue9
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"