gitlab-org--gitlab-foss/app/services/keys/destroy_service.rb
Rémy Coutable 6d81905faf
Introduce a new Keys::DestroyService service
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-16 20:26:22 +02:00

12 lines
235 B
Ruby

module Keys
class DestroyService < ::Keys::BaseService
def execute(key)
key.destroy if destroy_possible?(key)
end
# overriden in EE::Keys::DestroyService
def destroy_possible?(key)
true
end
end
end