summaryrefslogtreecommitdiff
path: root/app/services/protected_branches/update_service.rb
blob: 4b3337a5c9d940becec71b3ce7879c0125a09381 (plain)
1
2
3
4
5
6
7
8
9
10
module ProtectedBranches
  class UpdateService < BaseService
    def execute(protected_branch)
      raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)

      protected_branch.update(params)
      protected_branch
    end
  end
end