diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-06 00:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-06 00:09:10 +0300 |
commit | a29707687893beecb0e333a12e6f9e093a77eeb9 (patch) | |
tree | 8d89e554f4d8318a228f9d4717d2a9f75fc10651 /app/serializers | |
parent | 0b789f95a35aa3e4b99ce12fc98bd3cce6555602 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/merge_request_user_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/merge_request_user_entity.rb b/app/serializers/merge_request_user_entity.rb index 97912656bbb..12c573d1a13 100644 --- a/app/serializers/merge_request_user_entity.rb +++ b/app/serializers/merge_request_user_entity.rb @@ -20,7 +20,7 @@ class MergeRequestUserEntity < ::API::Entities::UserBasic find_reviewer_or_assignee(user, options)&.reviewed? end - expose :attention_requested, if: satisfies(:present?, :allows_reviewers?, :attention_requested_enabled?) do |user, options| + expose :attention_requested, if: ->(_, options) { options[:merge_request].present? && options[:merge_request].allows_reviewers? && request.current_user&.mr_attention_requests_enabled? } do |user, options| find_reviewer_or_assignee(user, options)&.attention_requested? end |