Reseed User Management

ReSeeD user management

⚠️ Note: This page is in the system section because ReSeeD still lacks a web interface for user management and thus requires the admin to log in via SSH and create/manage ReSeeD user accounts using the docker shell and rails console.

Create Users from the Rails Console

We have developed a rake task to register users called setup_users.rake. The rake task creates users defined in a JSON file. This task can also be used to update user information or their role.

Different ways to authenticate in ReSeeD

Users can authenticate into ReSeeD by the following means

If your user would like to sign in using the database or using Orcid authentication, they need to register in ReSeeD before they can sign in.

There is no need to register Shibboleth users using this rake task, except to assign them to appropriate roles.

User attributes

The list of possible user attributes are

User roles

Users can be assigned to the following roles

Preparing the JSON file

See the template file setup.json.template for an example JSON file.

Running the rake task

To run the rake task,

Note

If the rake task is run more than once using the same JSON file, the task will cycle through the list of users in the JSON file and check they exist.

Creating users at start-up

The rake task setup_hyrax.rake which is used to setup the application during docker startup, calls this rake task setup_users.rake to create users at start-up.

It creates all users listed in the file hyrax/seed/setup.json, if the file exists and the user does not exist at start-up.

To prepare the file hyrax/seed/setup.json, copy the template file and modify the user attributes as required. See Preparing the JSON file for details.

The user details will not be updated. So restarting a container will not overwrite any existing user details.

Setup.json (prior to v0.3.6)

Previous to release v0.3.6, the file hyrax/seed/setup.json was available. This has now been renamed to setup.json.template and extended to show how to create all of the different types of users, and roles. If you would like the file previous to release v0.3.6, download it using

wget https://gitlab.ruhr-uni-bochum.de/researchdata/rdms/-/blob/aad36d72974b4f8fd2753e91d44e08a7d4e9429e/hyrax/seed/setup.json

setup.json used in rdms.cottagelabs

setup.json

Manage Users on the Rails Console

Note: These commands are entered in the rails c console inside the web container.

# find user by email address
sometestvarfoobar = User.find_by_user_key("user@example.net")

# check content of variable
sometestvarfoobar

# change user's email address:
sometestvarfoobar.email="user@example.org"

# save changed email address to database
sometestvarfoobar.save

# delete the user
sometestvarfoobar.delete