Class: Dscf::Payment::ApplicationController

Inherits:
ActionController::API
  • Object
show all
Includes:
Core::Authenticatable, Core::JsonResponse, Core::TokenAuthenticatable
Defined in:
app/controllers/dscf/payment/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#bypass_permissions_for_demo?Boolean

TEMPORARY DEMO BYPASS: Bypass payment authorization checks for authenticated users only. Remove after the demo.

Returns:

  • (Boolean)


17
18
19
# File 'app/controllers/dscf/payment/application_controller.rb', line 17

def bypass_permissions_for_demo?
  true
end

#pundit_userObject



21
22
23
24
25
26
# File 'app/controllers/dscf/payment/application_controller.rb', line 21

def pundit_user
  user = current_user
  return nil unless user

  bypass_permissions_on_user!(user)
end