@ -24,7 +24,7 @@ class ApplicationController < ActionController::Base
rescue_from Mastodon :: NotPermittedError , with : :forbidden
rescue_from Mastodon :: NotPermittedError , with : :forbidden
before_action :store_current_location , except : :raise_not_found , unless : :devise_controller?
before_action :store_current_location , except : :raise_not_found , unless : :devise_controller?
before_action :check_ suspension , if : :user_signed_in?
before_action :check_ user_permissions , if : :user_signed_in?
def raise_not_found
def raise_not_found
raise ActionController :: RoutingError , " No route matches #{ params [ :unmatched_route ] } "
raise ActionController :: RoutingError , " No route matches #{ params [ :unmatched_route ] } "
@ -48,8 +48,8 @@ class ApplicationController < ActionController::Base
forbidden unless current_user & . staff?
forbidden unless current_user & . staff?
end
end
def check_ suspension
def check_ user_permissions
forbidden if current_user . account. suspended?
forbidden if current_user . disabled? || current_user . account. suspended?
end
end
def after_sign_out_path_for ( _resource_or_scope )
def after_sign_out_path_for ( _resource_or_scope )