class Refinery::Authentication::Devise::AuthorisationManager
Public Instance Methods
authenticate!()
click to toggle source
The user needs the 'refinery' role to access the admin.
# File lib/refinery/authentication/devise/authorisation_manager.rb, line 10 def authenticate! unless adapter.current_user.has_role?(:refinery) raise Zilch::Authorisation::NotAuthorisedException end adapter.current_user end
default_adapter()
click to toggle source
Override the default adapter specified in the superclass.
# File lib/refinery/authentication/devise/authorisation_manager.rb, line 19 def default_adapter @default_adapter ||= Refinery::Authentication::Devise::AuthorisationAdapter.new end
set_user!(user)
click to toggle source
This allows a user to be supplied, bypassing the usual detection.
# File lib/refinery/authentication/devise/authorisation_manager.rb, line 24 def set_user!(user) adapter.current_user = user end