Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 21:19:37 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 11:51:43 +0300
commit04c7d0d55500e6f118bd17153f3af11e83fce826 (patch)
tree7976d051ad4138dd020e78e2fd616f0791bd7123 /app/serializers/note_entity.rb
parent71ccfde322b633e9245bee6acba1e64cb7640f19 (diff)
Prevent awarding emoji when a project is archived
This prevents performing the requests, and disables all emoji reaction buttons
Diffstat (limited to 'app/serializers/note_entity.rb')
-rw-r--r--app/serializers/note_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/note_entity.rb b/app/serializers/note_entity.rb
index fa516fee6ec..06d603b277e 100644
--- a/app/serializers/note_entity.rb
+++ b/app/serializers/note_entity.rb
@@ -17,6 +17,10 @@ class NoteEntity < API::Entities::Note
expose :can_edit do |note|
Ability.allowed?(request.current_user, :admin_note, note)
end
+
+ expose :can_award_emoji do |note|
+ Ability.allowed?(request.current_user, :award_emoji, note)
+ end
end
expose :resolved?, as: :resolved