blob: 7190bc2001b4045c6ddf86e9fbe319aebff541b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# frozen_string_literal: true
module ProtectedBranches
class DestroyService < BaseService
def execute(protected_branch)
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :destroy_protected_branch, protected_branch)
protected_branch.destroy
end
end
end
|