summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r--src/leap/bitmask/core/dispatcher.py4
-rw-r--r--src/leap/bitmask/core/web/bitmask.js9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index 72f98506..a2fd6387 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 554b4904..4a837a09 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