Starlight: Automate admin user setup in development environment
It would be nice for development purposes to automate the creation of a basic admin account user as a starting point for development. This could perhaps be a simple rake task that we can include in the docker setup, and point people to that want to run on a localhost setup?
This would consist of something like:
- create a test user (using the developer strategy, which should only require email address, name, provider)
- assign that user as an side admin
- print (and/or document) the user login info for the developer
The site admin bit can probably just directly invoke the work that the rake task does:
desc 'Add application-wide admin privileges to a user'
task admin: :environment do
u = prompt_to_create_user
Spotlight::Role.create(user: u, resource: Spotlight::Site.instance, role: 'admin')
end
Acceptance Criteria:
- [ ]