-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi, I feel I'm so close to getting this to work…
I wrote a script, new_user.py, to add a user to my install (the goal is to add all of my students):
import dhbox
a = [("muziejus@blah.com", "muziejus-admin", "password")]
for user in a:
the_user = dhbox.user_datastore.create_user(email=user[0], name=user[1], password=user[2], dhbox_duration=1000000000)
# Uncomment to make admins
# dhbox.user_datastore.add_role_to_user(the_user, dhbox.Role.query.filter(dhbox.Role.name == 'admin').first())
dhbox.DockerBackend.setup_new_dhbox(user[1], user[2], user[0])
dhbox.db.session.commit()
This creates a user in the db and a box for the user. It clearly assumes that no such user already exists. I can login, I can use the web-based cli and login there with the username and password above. Jupyter has some fits accepting the password, but that seems to be a Safari issue, because it's not flashing "invalid password." It just reloads the login.
So, point is, I think there should be a bit of documentation about this? I can write something but I'm not sure I have all of the nuances right…
reynoldsnlp
Metadata
Metadata
Assignees
Labels
No labels