Skip to content

Commit

Permalink
Move seed into db/seeds.rb
Browse files Browse the repository at this point in the history
Previously the creation of a seed user was conflated with the config
for GDS SSO, which is actually automated [1].

Note that, despite the claim in the comment, this app does not make use
of the "mock bearer token" strategy in GDS SSO, since this is for APIs
(of which this app has none).

[1]: https://github.com/alphagov/gds-sso/blob/6a3a226b1c300c497bfd5a3d459130e3c99e03ed/lib/gds-sso/warden_config.rb#L75
  • Loading branch information
Ben Thorner committed Nov 10, 2020
1 parent 03ecd20 commit 5c8bda4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
14 changes: 0 additions & 14 deletions config/initializers/gds_sso.rb

This file was deleted.

5 changes: 5 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
User.find_or_create_by!(email: "[email protected]").tap do |u|
u.name = "Test User"
u.permissions = %w[signin manage_short_urls request_short_urls advanced_options receive_notifications]
u.save!
end

0 comments on commit 5c8bda4

Please sign in to comment.