debian-mirror-gitlab/app/serializers/merge_request_sidebar_basic_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
402 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
class MergeRequestSidebarBasicEntity < IssuableSidebarBasicEntity
expose :current_user, if: lambda { |_issuable| current_user } do
expose :can_merge do |merge_request|
merge_request.can_be_merged_by?(current_user)
end
2022-03-02 08:16:31 +05:30
expose :can_update_merge_request do |merge_request|
current_user.can?(:update_merge_request, merge_request)
end
2019-12-04 20:38:33 +05:30
end
end