Merge commit 'aa04efb92a47cf27c1aafb2aeb21584e91c526ac' into glitch-soc/merge-upstream

Conflicts:
- `app/models/user_settings.rb`:
  Not a real conflict, upstream added a setting on a line adjacent to a
  glitch-soc-only line.
  Added upstream's new setting.
This commit is contained in:
Claire
2025-05-14 13:38:23 +02:00
133 changed files with 957 additions and 272 deletions

View File

@@ -79,7 +79,14 @@ module Mastodon::CLI
account = Account.new(username: username)
password = SecureRandom.hex
user = User.new(email: options[:email], password: password, agreement: true, role_id: role_id, confirmed_at: options[:confirmed] ? Time.now.utc : nil, bypass_invite_request_check: true)
user = User.new(
email: options[:email],
password: password,
agreement: true,
role_id: role_id,
confirmed_at: options[:confirmed] ? Time.now.utc : nil,
bypass_registration_checks: true
)
if options[:reattach]
account = Account.find_local(username) || Account.new(username: username)

View File

@@ -552,7 +552,7 @@ namespace :mastodon do
password = SecureRandom.hex(16)
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 = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_registration_checks: true, role: owner_role)
user.save(validate: false)
user.approve!