summaryrefslogtreecommitdiff
path: root/app/serializers/merge_request_sidebar_basic_entity.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-12 15:13:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-12 15:13:54 +0000
commit462b603802e45891ac5152aea8cbc9298d7d4a53 (patch)
treede7e03460744491c0d7dcc6e3340272f833fb3b7 /app/serializers/merge_request_sidebar_basic_entity.rb
parentda646aac6c559584f63d1fc06132d7351abcfac6 (diff)
downloadgitlab-ce-462b603802e45891ac5152aea8cbc9298d7d4a53.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers/merge_request_sidebar_basic_entity.rb')
-rw-r--r--app/serializers/merge_request_sidebar_basic_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/merge_request_sidebar_basic_entity.rb b/app/serializers/merge_request_sidebar_basic_entity.rb
index 3c911bbe4c8..a0832655563 100644
--- a/app/serializers/merge_request_sidebar_basic_entity.rb
+++ b/app/serializers/merge_request_sidebar_basic_entity.rb
@@ -5,5 +5,9 @@ class MergeRequestSidebarBasicEntity < IssuableSidebarBasicEntity
expose :can_merge do |merge_request|
merge_request.can_be_merged_by?(current_user)
end
+
+ expose :can_update_merge_request do |merge_request|
+ current_user.can?(:update_merge_request, merge_request)
+ end
end
end