Module: Devise::Auth0::Controllers::Helpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/auth0/controllers/helpers.rb
Overview
Those helpers are convenience methods added to ApplicationController.
Instance Method Summary collapse
Instance Method Details
#authorize!(*args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/devise/auth0/controllers/helpers.rb', line 22 def (*args) = args. = [:message] if cannot?(*args) raise AccessDenied.new(, *args) end args end |
#can?(*args) ⇒ Boolean
33 34 35 |
# File 'lib/devise/auth0/controllers/helpers.rb', line 33 def can?(*args) !!current_auth0&.can?(*args) end |
#cannot?(*args) ⇒ Boolean
37 38 39 |
# File 'lib/devise/auth0/controllers/helpers.rb', line 37 def cannot?(*args) !!current_auth0&.cannot?(*args) end |