2
0

Change redirection for denied registration from web app to sign-in page with error message (#36384)

This commit is contained in:
Claire
2025-10-15 13:37:22 +02:00
committed by GitHub
parent c6de46d12d
commit fab0dd0bcf
3 changed files with 6 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
end
def check_enabled_registrations
redirect_to root_path unless allowed_registration?(request.remote_ip, @invite)
redirect_to new_user_session_path, alert: I18n.t('devise.failure.closed_registrations', email: Setting.site_contact_email) unless allowed_registration?(request.remote_ip, @invite)
end
def invite_code