mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 23:01:10 +08:00
FEATURE: User fields required for existing users - Part 2 (#27172)
We want to allow admins to make new required fields apply to existing users. In order for this to work we need to have a way to make those users fill up the fields on their next page load. This is very similar to how adding a 2FA requirement post-fact works. Users will be redirected to a page where they can fill up the remaining required fields, and until they do that they won't be able to do anything else.
This commit is contained in:
@ -86,6 +86,7 @@ class UsersController < ApplicationController
|
||||
# once that happens you can't log in with social
|
||||
skip_before_action :verify_authenticity_token, only: [:create]
|
||||
skip_before_action :redirect_to_login_if_required,
|
||||
:redirect_to_profile_if_required,
|
||||
only: %i[
|
||||
check_username
|
||||
check_email
|
||||
@ -102,6 +103,7 @@ class UsersController < ApplicationController
|
||||
admin_login
|
||||
confirm_admin
|
||||
]
|
||||
skip_before_action :redirect_to_profile_if_required, only: %i[show staff_info update]
|
||||
|
||||
after_action :add_noindex_header, only: %i[show my_redirect]
|
||||
|
||||
|
Reference in New Issue
Block a user