mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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,8 @@
|
||||
require_dependency 'discourse'
|
||||
|
||||
class PostActionsController < ApplicationController
|
||||
prepend_before_action :check_xhr, :ensure_logged_in
|
||||
requires_login
|
||||
|
||||
before_action :fetch_post_from_params
|
||||
before_action :fetch_post_action_type_id_from_params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user