Skip to content

Commit

Permalink
Merge pull request #2445 from alphagov/remove-unused-rake-task
Browse files Browse the repository at this point in the history
Remove users:create rake task
  • Loading branch information
chrislo authored Oct 18, 2023
2 parents 610ed2f + 2c6ffbe commit 1d2ae66
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 119 deletions.
11 changes: 0 additions & 11 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ This will create and return a client ID and secret that can be used in the app
You can then add the ID and secret to the app's `ENV` using your preferred
method.

To create a new user, use the following syntax:

```sh
rake users:create name='First Last' email=user@example.com \
applications=Comma,Seperated,ListOf,Application,Names* \
[github=username] [twitter=username]
```

\* You can also set the applications in a comma separated list via an
`ENV['applications']` variable if you prefer.

## Access Tokens

You may also need to create an access token, so one application can identify
Expand Down
13 changes: 0 additions & 13 deletions lib/tasks/users.rake
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
require "date"

namespace :users do
desc "Create a new user (specify name and email in environment)"
task create: :environment do
raise "Requires name, email and applications specified in environment" unless ENV["name"] && ENV["email"] && ENV["applications"]

user_creator = UserCreator.new(ENV["name"], ENV["email"], ENV["applications"])
user_creator.create_user!

puts "User created: user.name <#{user_creator.user.name}>"
puts " user.email <#{user_creator.user.email}>"
puts " signin permissions for: '#{user_creator.applications.map(&:name).join("', '")}' "
puts " follow this link to set a password: #{user_creator.invitation_url}"
end

desc "Remind users that their account will get suspended"
task send_suspension_reminders: :environment do
include VolatileLock::DSL
Expand Down
47 changes: 0 additions & 47 deletions lib/user_creator.rb

This file was deleted.

48 changes: 0 additions & 48 deletions test/lib/user_creator_test.rb

This file was deleted.

0 comments on commit 1d2ae66

Please sign in to comment.