From 4d73f4eedb35e2d6007f46e6ba8196184ced52ab Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 6 May 2015 15:35:23 -0700 Subject: [PATCH] note that admin is a single value --- jupyterhub/apihandlers/users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyterhub/apihandlers/users.py b/jupyterhub/apihandlers/users.py index 3fa8dfc0..6708b87c 100644 --- a/jupyterhub/apihandlers/users.py +++ b/jupyterhub/apihandlers/users.py @@ -27,8 +27,10 @@ class UserListAPIHandler(APIHandler): raise web.HTTPError(400, "Must specify at least one user to create") usernames = data.pop('usernames') - admin = data.get('admin', False) self._check_user_model(data) + # admin is set for all users + # to create admin and non-admin users requires at least two API requests + admin = data.get('admin', False) to_create = [] for name in usernames: