summaryrefslogtreecommitdiff
path: root/app/services/keys/destroy_service.rb
blob: eaf5eb35f5832fa4638af37447a3ec461ae60598 (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_mod_with('Keys::DestroyService')