summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core/dispatcher.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-06-28 18:39:12 +0200
committerRuben Pollan <meskio@sindominio.net>2016-07-03 16:04:41 +0200
commitf15673c6591036882bb6a277d5b9e73d3c7e348a (patch)
tree034e4c6584bc74d73bd7343b8d7c8244782fc8d8 /src/leap/bitmask/core/dispatcher.py
parentff7c106ee5bd950bb87279188bde1c06c47507fb (diff)
[feat] add delete key command to the cli
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r--src/leap/bitmask/core/dispatcher.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index db40a675..785c60dc 100644
--- a/src/leap/bitmask/core/dispatcher.py
+++ b/src/leap/bitmask/core/dispatcher.py
@@ -171,6 +171,17 @@ class KeysCmd(SubCommand):
d.addCallback(service.do_export, address)
return d
+ @register_method('str')
+ def do_DELETE(self, service, *parts, **kw):
+ if len(parts) < 3:
+ return defer.fail("An email address is needed")
+ address = parts[2]
+
+ bonafide = kw['bonafide']
+ d = bonafide.do_get_active_user()
+ d.addCallback(service.do_delete, address)
+ return d
+
class CommandDispatcher(object):