Change automatic post deletion configuration to be accessible to redirected users (#20774)
Fixes #20550
This commit is contained in:
@@ -19,6 +19,10 @@ class StatusesCleanupController < ApplicationController
|
||||
# Do nothing
|
||||
end
|
||||
|
||||
def require_functional!
|
||||
redirect_to edit_user_registration_path unless current_user.functional_or_moved?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_policy
|
||||
|
@@ -237,7 +237,11 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def functional?
|
||||
confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial? && account.moved_to_account_id.nil?
|
||||
functional_or_moved? && account.moved_to_account_id.nil?
|
||||
end
|
||||
|
||||
def functional_or_moved?
|
||||
confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial?
|
||||
end
|
||||
|
||||
def unconfirmed?
|
||||
|
Reference in New Issue
Block a user