mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-22 02:03:18 +00:00
Change redirection for denied registration from web app to sign-in page with error message (#36384)
This commit is contained in:
parent
c6de46d12d
commit
fab0dd0bcf
3 changed files with 6 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue