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

create_service.rb « protected_branches « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a84e335340d2f3194639a5c7ea5e866dd645f7a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
module ProtectedBranches
  class CreateService < BaseService
    attr_reader :protected_branch

    def execute
      raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)

      project.protected_branches.create(params)
    end
  end
end