mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +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:
@ -1,7 +1,7 @@
|
||||
class Admin::AdminController < ApplicationController
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in
|
||||
prepend_before_action :check_xhr, :ensure_staff
|
||||
requires_login
|
||||
before_action :ensure_staff
|
||||
|
||||
def index
|
||||
render body: nil
|
||||
|
Reference in New Issue
Block a user