mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-05 03:19:04 +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.
20 lines
465 B
Ruby
20 lines
465 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Settings::SessionsController < Settings::BaseController
|
|
before_action :authenticate_user!
|
|
before_action :set_session, only: :destroy
|
|
|
|
skip_before_action :require_functional!
|
|
|
|
def destroy
|
|
@session.destroy!
|
|
flash[:notice] = I18n.t('sessions.revoke_success')
|
|
redirect_to edit_user_registration_path
|
|
end
|
|
|
|
private
|
|
|
|
def set_session
|
|
@session = current_user.session_activations.find(params[:id])
|
|
end
|
|
end
|