summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorbarthc <mackintosh02@gmail.com>2016-08-17 12:21:06 +0100
committerbarthc <mackintosh02@gmail.com>2016-08-28 18:15:55 +0100
commit76872372376e57cd7d55ba9b9c63b25fe53c82df (patch)
tree1d7a93bd75644fdecd292e835b46c80046e4b222 /app/models/note.rb
parent68b3c8c2973a8fe1ee3f51091394acef2a25789d (diff)
downloadgitlab-ce-76872372376e57cd7d55ba9b9c63b25fe53c82df.tar.gz
prevent authored awardable thumbs votes
prevent authored awardable thumbs votes prevent authored awardable thumbs votes
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index f2656df028b..b94e3cff2ce 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -223,6 +223,10 @@ class Note < ActiveRecord::Base
end
end
+ def user_authored?(user)
+ user == author
+ end
+
def award_emoji?
can_be_award_emoji? && contains_emoji_only?
end