mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 22:31:36 +01:00
964ae8eee5
Allow access to account settings, 2FA, authorized applications, and account deletions to unconfirmed and pending users, as well as users who had their accounts disabled. Suspended users cannot update their e-mail or password or delete their account. Display account status on account settings page, for example, when an account is frozen, limited, unconfirmed or pending review. After sign up, login users straight away and show a simple page that tells them the status of their account with links to account settings and logout, to reduce onboarding friction and allow users to correct wrongly typed e-mail addresses. Move the final sign-up step of SSO integrations to be the same as above to reduce code duplication.
11 lines
737 B
Ruby
11 lines
737 B
Ruby
Doorkeeper::Application.create!(name: 'Web', superapp: true, redirect_uri: Doorkeeper.configuration.native_redirect_uri, scopes: 'read write follow push')
|
|
|
|
domain = ENV['LOCAL_DOMAIN'] || Rails.configuration.x.local_domain
|
|
account = Account.find_or_initialize_by(id: -99, actor_type: 'Application', locked: true, username: domain)
|
|
account.save!
|
|
|
|
if Rails.env.development?
|
|
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, admin: true, account: admin, agreement: true, approved: true).save!
|
|
end
|