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:
@@ -2,7 +2,7 @@ require_dependency 'rate_limiter'
|
||||
|
||||
class InvitesController < ApplicationController
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, only: [
|
||||
requires_login only: [
|
||||
:destroy, :create, :create_invite_link, :rescind_all_invites,
|
||||
:resend_invite, :resend_all_invites, :upload_csv
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user