summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/bonafide/_protocol.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-09-29 11:45:24 -0500
committerKali Kaneko (leap communications) <kali@leap.se>2016-10-04 01:37:03 -0400
commit8589bd13c7aa9054dc27d8b3be5ede9ebffb6abe (patch)
tree8a0b6c1e8c7cbb4bce09c71bfb4ea4589742ba85 /src/leap/bitmask/bonafide/_protocol.py
parent082b08a0c856950fc0013da49c8a9d1ffc358f6c (diff)
[feat] list active users
- Resolves: 8488
Diffstat (limited to 'src/leap/bitmask/bonafide/_protocol.py')
-rw-r--r--src/leap/bitmask/bonafide/_protocol.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/bitmask/bonafide/_protocol.py b/src/leap/bitmask/bonafide/_protocol.py
index 7917f38..01919c7 100644
--- a/src/leap/bitmask/bonafide/_protocol.py
+++ b/src/leap/bitmask/bonafide/_protocol.py
@@ -147,6 +147,13 @@ class BonafideProtocol(object):
d.addCallback(lambda _: '%s logged out' % full_id)
return d
+ def do_list_users(self):
+ users = []
+ for user, session in self._sessions.items():
+ users.append({'userid': user,
+ 'authenticated': session.is_authenticated})
+ return users
+
def do_change_password(self, full_id, current_password, new_password):
log.msg('Change password for %s' % full_id)
if (full_id not in self._sessions or