From 8589bd13c7aa9054dc27d8b3be5ede9ebffb6abe Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 29 Sep 2016 11:45:24 -0500 Subject: [feat] list active users - Resolves: 8488 --- src/leap/bitmask/core/dispatcher.py | 4 ++++ src/leap/bitmask/core/web/bitmask.js | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'src/leap/bitmask/core') diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 72f9850..a2fd638 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -119,6 +119,10 @@ class UserCmd(SubCommand): user = parts[2] return bonafide.do_logout(user) + @register_method("[{'userid': str, 'authenticated': bool}]") + def do_LIST(self, bonafide, *parts): + return bonafide.do_list_users() + @register_method("{'update': 'ok'}") def do_UPDATE(self, bonafide, *parts): user, current_password, new_password = parts[2], parts[3], parts[4] diff --git a/src/leap/bitmask/core/web/bitmask.js b/src/leap/bitmask/core/web/bitmask.js index 554b490..4a837a0 100644 --- a/src/leap/bitmask/core/web/bitmask.js +++ b/src/leap/bitmask/core/web/bitmask.js @@ -178,6 +178,15 @@ var bitmask = function(){ return call(['bonafide', 'user', 'logout', uid]); }, + /** + * List users + * + * @return {Promise} [{'userid': str, 'authenticated': boolean}] + */ + list: function() { + return call(['bonafide', 'user', 'list']); + }, + /** * Change password * -- cgit v1.2.3