blob: 1815d92421e1d76447f0f03f5219d02a9a43928b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# frozen_string_literal: true
module ProtectedBranches
class UpdateService < BaseService
def execute(protected_branch)
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :update_protected_branch, protected_branch)
protected_branch.update(params)
protected_branch
end
end
end
ProtectedBranches::UpdateService.prepend_mod_with('ProtectedBranches::UpdateService')
|