Closed dvanic closed 2 years ago
Hey Darya, thank you for reviewing SampleDB!
If LDAP is configured, you can simply sign in with your LDAP user credentials. Otherwise, you can use an administration script to create a new user. If using docker, the syntax for this would be something like: docker exec sampledb env/bin/python -m sampledb create_other_user <username> <email>
A password will be generated for this user and you can then sign in using the username and password. This user will have the same rights as every other "normal" user. To turn it into an administrator, you would use the set_administrator
script (like the create_other_user
script above).
Once you have this initial user, you can use it to invite others via the Invite a guest
button at the top right.
So I can see this being very useful for people in something like my (very old) home discipline of biology, where you're tracking a lot of samples, and the metadata you want to store about it is things like date/experiment/lab notebook link/freezer/results values of random assay (manually entered).
What I found missing is instructions on how to go and set up from scratch. Imagine I'm a PI who wants my research assistant to set up a new instance of this in the lab. What should that person set up first?
And do administrator privileges get limited by group? Or is it regular user/instance administrator?
I think there are two paths for this: one is setting up a SampleDB locally, trying it out and preparing for a production system, the other is setting up SampleDB for production. For the latter I would expect that person to contact someone from their IT staff to discuss things like setting up a publicly reachable VM, registering a domain, TLS termination and backups, basically general things when setting up a new public-facing web application, independent of it being SampleDB. They should also discuss user management, as there likely already is a user management solution being used. This might be LDAP, in which case it's easy to use with SampleDB, this might be something that can be integrated in SampleDB in the future, or they might decide to invite users individually.
Once both of these "paths" have reached the point where SampleDB is running and a user can sign in, what is left is to set up the instruments and actions, by discussing what metadata should be stored. This can be done iteratively, improving the actions as they are used.
After this, SampleDB is fully ready for use. Features like groups, projects, locations and JupyterHub support are fully optional and can be configured later on, when the need arises.
I'll have to think about how to extend the "Getting Started" and "Next Steps" sections to offer more concrete guidance for this initial setup and first use.
Administrators are individual users.
I have added an option to create an admin user when initially setting up an instance of SampleDB, by passing SAMPLEDB_ADMIN_PASSWORD
(and optionally SAMPLEDB_ADMIN_USERNAME
and SAMPLEDB_ADMIN_EMAIL
) similar to how it's done for other dockerized applications. This way new users will have an account to sign in straight away, and can then invite themselves (if they want to keep their account separate from the admin account) or other users. They can then use that account to create instruments and actions, etc.
While the option is already shown in the README, it was just added so it isn't available in the Docker image from the previous release. I will make a few more changes and then publish a new release in the next couple of days.
I have also updated the language referring to users without LDAP as guests. This will only happen, if the system actually has LDAP configured. Otherwise, they will simply be referred to as users, to avoid confusion.
I've added an Administrator Guide to the documentation, with a Getting Started section covering not just the minimal installation, but walking people wanting to run SampleDB through the first steps. This includes the creation of an admin account using the variables mentioned above and information on setting up LDAP or inviting new users.
Does this getting started guide, in addition to what's already in the user guide, solve this issue?
How does one set up a new user, when running a vanilla instance of sampleDB? What permissions does this user have by default?