summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorCindy Pallares <cindy@gitlab.com>2018-11-28 19:04:15 +0000
committerCindy Pallares <cindy@gitlab.com>2018-11-28 19:11:56 -0500
commite122e14ac6a25c7813ca888a97bd4a3298e78d9d (patch)
treebd3774fae0517a63dd1e30b3fc95c00c54878357 /app/models/note.rb
parentffd1c4cd453043448198d4a1c9582f5c54f5c377 (diff)
downloadgitlab-ce-e122e14ac6a25c7813ca888a97bd4a3298e78d9d.tar.gz
Merge branch 'security-guest-comments' into 'master'
[master]Fixed ability to comment on and edit/delete comments on locked or confidential issues See merge request gitlab/gitlabhq!2612
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 592efb714f3..a6ae4f58ac4 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -324,7 +324,7 @@ class Note < ActiveRecord::Base
end
def to_ability_name
- for_personal_snippet? ? 'personal_snippet' : noteable_type.underscore
+ for_snippet? ? noteable.class.name.underscore : noteable_type.underscore
end
def can_be_discussion_note?