Skip to content

Commit

Permalink
Fix development environment admin account not being auto-approved (ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Apr 16, 2024
1 parent caad1e2 commit 5915bd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/seeds/04_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
admin = Account.where(username: 'admin').first_or_initialize(username: 'admin')
admin.save(validate: false)

User.where(email: "admin@#{domain}").first_or_initialize(email: "admin@#{domain}", password: 'mastodonadmin', password_confirmation: 'mastodonadmin', confirmed_at: Time.now.utc, role: UserRole.find_by(name: 'Owner'), account: admin, agreement: true, approved: true).save!
user = User.where(email: "admin@#{domain}").first_or_initialize(email: "admin@#{domain}", password: 'mastodonadmin', password_confirmation: 'mastodonadmin', confirmed_at: Time.now.utc, role: UserRole.find_by(name: 'Owner'), account: admin, agreement: true, approved: true)
user.save!
user.approve!
end

0 comments on commit 5915bd7

Please sign in to comment.