mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
This commit is contained in:
@ -9,7 +9,7 @@ class UsersController < ApplicationController
|
||||
|
||||
skip_before_action :authorize_mini_profiler, only: [:avatar]
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, only: [
|
||||
requires_login only: [
|
||||
:username, :update, :user_preferences_redirect, :upload_user_image,
|
||||
:pick_avatar, :destroy_user_image, :destroy, :check_emails, :topic_tracking_state,
|
||||
:preferences
|
||||
|
Reference in New Issue
Block a user