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

destroy_service.rb « keys « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4552c5cf9a267d33e8e3db7870e112c7d1675b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Keys
  class DestroyService < ::Keys::BaseService
    def execute(key)
      key.destroy if destroy_possible?(key)
    end

    # overridden in EE::Keys::DestroyService
    def destroy_possible?(key)
      true
    end
  end
end

Keys::DestroyService.prepend_if_ee('EE::Keys::DestroyService')