2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
module Keys
|
|
|
|
class DestroyService < ::Keys::BaseService
|
|
|
|
def execute(key)
|
|
|
|
key.destroy if destroy_possible?(key)
|
|
|
|
end
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
# overridden in EE::Keys::DestroyService
|
2018-11-08 19:23:39 +05:30
|
|
|
def destroy_possible?(key)
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
Keys::DestroyService.prepend_if_ee('EE::Keys::DestroyService')
|