BigW Consortium Gitlab

Commit 8a130d85 by Fatih Acet

IssueNotesRefactor: Only show close/reopen button if user can update issue.

parent 47bd607e
...@@ -53,6 +53,10 @@ export default { ...@@ -53,6 +53,10 @@ export default {
'js-note-target-reopen': !this.isIssueOpen, 'js-note-target-reopen': !this.isIssueOpen,
} }
}, },
canUpdateIssue() {
const { issueData } = window.gl;
return issueData && issueData.current_user.can_update;
},
}, },
methods: { methods: {
handleSave(withIssueAction) { handleSave(withIssueAction) {
...@@ -239,6 +243,7 @@ export default { ...@@ -239,6 +243,7 @@ export default {
</div> </div>
<a <a
@click="handleSave(true)" @click="handleSave(true)"
v-if="canUpdateIssue"
:class="actionButtonClassNames" :class="actionButtonClassNames"
class="btn btn-nr btn-comment btn-comment-and-close" class="btn btn-nr btn-comment btn-comment-and-close"
role="button"> role="button">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment