mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:01: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:
@ -2,7 +2,7 @@ class UserApiKeysController < ApplicationController
|
||||
|
||||
layout 'no_ember'
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, only: [:create, :revoke, :undo_revoke]
|
||||
requires_login only: [:create, :revoke, :undo_revoke]
|
||||
skip_before_action :redirect_to_login_if_required, only: [:new]
|
||||
skip_before_action :check_xhr, :preload_json
|
||||
|
||||
|
Reference in New Issue
Block a user