auth controller needs no pundit
This commit is contained in:
parent
75a4fbf71a
commit
d3205a6080
@ -3,6 +3,10 @@ module Admin
|
||||
class AuthController < AdminController
|
||||
skip_before_action :authorize_user
|
||||
|
||||
# bypass pundit lockdowns for auth requests.
|
||||
after_action :skip_policy_scope
|
||||
after_action :skip_authorization
|
||||
|
||||
def login
|
||||
end
|
||||
|
||||
|
@ -4,8 +4,8 @@ class AdminController < ApplicationController
|
||||
layout 'admin'
|
||||
before_action :authorize_user
|
||||
|
||||
# after_action :verify_authorized, except: :index
|
||||
# after_action :verify_policy_scoped, only: :index
|
||||
after_action :verify_authorized, except: :index
|
||||
after_action :verify_policy_scoped, only: :index
|
||||
|
||||
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user