Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1f093bcd
Commit
1f093bcd
authored
Jul 04, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Don’t show report as abuse link for own notes.
parent
7fcc1eef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/assets/javascripts/notes/components/issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+4
-0
app/assets/javascripts/notes/components/issue_note_actions.vue
...ssets/javascripts/notes/components/issue_note_actions.vue
+5
-1
No files found.
app/assets/javascripts/notes/components/issue_note.vue
View file @
1f093bcd
...
...
@@ -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"
/>
...
...
app/assets/javascripts/notes/components/issue_note_actions.vue
View file @
1f093bcd
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment