Fix admin account created by `mastodon:setup` not being auto-approved (#29379)

pull/30468/head
Claire 2024-02-23 20:04:57 +01:00
parent 209632a0fd
commit affbb10566
1 changed files with 1 additions and 0 deletions

View File

@ -516,6 +516,7 @@ namespace :mastodon do
owner_role = UserRole.find_by(name: 'Owner')
user = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true, role: owner_role)
user.save(validate: false)
user.approve!
Setting.site_contact_username = username