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

update_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: 89d8ba601345f7cea3f7921aea14da7e1428c19b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module ProtectedBranches
  class UpdateService < BaseService
    attr_reader :protected_branch

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

      @protected_branch = protected_branch
      @protected_branch.update(params)
      @protected_branch
    end
  end
end