diff options
author | Rémy Coutable <remy@rymai.me> | 2018-05-16 20:26:22 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-05-16 20:26:22 +0200 |
commit | 6d81905fafb23f20520eb5ffa46c94b18ccc8686 (patch) | |
tree | e265085fa9378a96ddcbae0d51e3f3cdb3de5b8e /app/services/keys/destroy_service.rb | |
parent | c75ae23729771869591b6bc4f1528581d3bfe999 (diff) | |
download | gitlab-ce-6d81905fafb23f20520eb5ffa46c94b18ccc8686.tar.gz |
Introduce a new Keys::DestroyService service
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services/keys/destroy_service.rb')
-rw-r--r-- | app/services/keys/destroy_service.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/services/keys/destroy_service.rb b/app/services/keys/destroy_service.rb new file mode 100644 index 00000000000..785cfa3a1d8 --- /dev/null +++ b/app/services/keys/destroy_service.rb @@ -0,0 +1,12 @@ +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 |