diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-06 20:19:37 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-11 10:51:43 +0200 |
commit | 04c7d0d55500e6f118bd17153f3af11e83fce826 (patch) | |
tree | 7976d051ad4138dd020e78e2fd616f0791bd7123 /app/helpers/issues_helper.rb | |
parent | 71ccfde322b633e9245bee6acba1e64cb7640f19 (diff) | |
download | gitlab-ce-04c7d0d55500e6f118bd17153f3af11e83fce826.tar.gz |
Prevent awarding emoji when a project is archived
This prevents performing the requests, and disables all emoji reaction buttons
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 0f25d401406..5a2f7bb01c7 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -82,8 +82,8 @@ module IssuesHelper names.to_sentence end - def award_state_class(awards, current_user) - if !current_user + def award_state_class(awardable, awards, current_user) + if !can?(current_user, :award_emoji, awardable) "disabled" elsif current_user && awards.find { |a| a.user_id == current_user.id } "active" |