openflighthpc / flight-control

0 stars 0 forks source link

Base user model and signin/signout form #17

Closed VoxSecundus closed 2 years ago

VoxSecundus commented 2 years ago

This PR introduces the start of the users workflow to Flight Control. The devise gem is being used to handle the user model and the authentication workflow.

Overview

Rake tasks

A set of rake tasks have been added for managing users.

To create a user:

rake users:create[username]

The console will print a confirmation of the username and the randomly generated password. This password cannot be retrieved once the terminal history has moved on.

To archive a user:

rake users:archive[username]

The user will no longer be able to log in.

To un-archive a user:

rake users:activate[username]

To list all users/show status of a single user:

rake users:list
rake users:status[username]

Currently, the usernames and archival status are listed.


NB: Most of the files in app/views/user/ are default files generated by Devise so that I could tweak them. The only files I changed are:

app/views/devise/sessions/new.html.erb # Removed `shared_links` call at the bottom
VoxSecundus commented 2 years ago

Rebased on main