Commit 1f093bcd authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Don’t show report as abuse link for own notes.

parent 7fcc1eef
......@@ -35,6 +35,9 @@ export default {
'disabled-content': this.isDeleting,
};
},
canReportAsAbuse() {
return this.note.report_abuse_path && this.author.id !== window.gon.current_user_id;
},
},
methods: {
editHandler() {
......@@ -116,6 +119,7 @@ export default {
:canAward="note.emoji_awardable"
:canEdit="note.current_user.can_edit"
:canDelete="note.current_user.can_edit"
:canReportAsAbuse="canReportAsAbuse"
:reportAbusePath="note.report_abuse_path"
:editHandler="editHandler"
:deleteHandler="deleteHandler" />
......
......@@ -22,6 +22,10 @@ export default {
type: Boolean,
required: true,
},
canReportAsAbuse: {
type: Boolean,
required: true,
},
editHandler: {
type: Function,
required: true,
......@@ -90,7 +94,7 @@ export default {
</li>
<li class="divider"></li>
</template>
<li v-if="reportAbusePath">
<li v-if="canReportAsAbuse">
<a :href="reportAbusePath">
Report as abuse
</a>
......
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