diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-09-29 11:45:24 -0500 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-04 01:37:03 -0400 |
commit | 8589bd13c7aa9054dc27d8b3be5ede9ebffb6abe (patch) | |
tree | 8a0b6c1e8c7cbb4bce09c71bfb4ea4589742ba85 /src/leap/bitmask/core | |
parent | 082b08a0c856950fc0013da49c8a9d1ffc358f6c (diff) |
[feat] list active users
- Resolves: 8488
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/core/web/bitmask.js | 9 |
2 files changed, 13 insertions, 0 deletions
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 @@ -179,6 +179,15 @@ var bitmask = function(){ }, /** + * List users + * + * @return {Promise<json>} [{'userid': str, 'authenticated': boolean}] + */ + list: function() { + return call(['bonafide', 'user', 'list']); + }, + + /** * Change password * * @param {string} uid The uid to log in |