Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a simple script to add a single user to the app #977

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

grenewode
Copy link
Contributor

Why

Previously there has not been an easy way to add a new user to the application prior to configuring a SMTP server to dispatch confirmation emails.

What

Create a rake task that

  • May be invoked as bin/rake add_user EMAIL=example@exampler.com PASSWORD=mysupersecurepassword
  • Takes exactly the command line arguments EMAIL and PASSWORD
  • Creates the user immediately, with no need for any additional confirmation

How

Omitted, as this was a very simple change.

Testing

Omitted, as this task is only meant to be run by developers in non-production environments

Next Steps

  1. Add a simple test to ensure syntactic/semantic comparability over time.
  2. Perhaps add a safety check to ensure that developers must manually specify, similar to DISABLE_DATABASE_ENVIRONMENT_CHECK=1

Accessibility

Omitted, as this is a developer-only feature.

Security

This script cannot be run without administrator shell access to the server hosting the application, and anyone who has administrator shell access to the server is able to do anything they want. Therefore, security of this script isn't really relevant since any scenario where this is invoked by a bad actor is also a scenario where the bad actor can do arbitrary other things.

Pre-Merge Checklist

  • Security & accessibility have been considered
  • Tests have been added, or an explanation has been given why the features cannot be tested
  • Documentation and comments have been added to the codebase where required
  • Entry added to CHANGELOG.md if appropriate
  • Outstanding questions and concerns have been resolved
  • Any next steps have been turned into Issues or Discussions as appropriate

Also, thanks to @h-m-m for their help making this change!

Copy link
Collaborator

@solebared solebared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@solebared solebared merged commit a35c6fe into rubyforgood:main Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants