Module: Gatekeeper::Helpers::Authentication
- Defined in:
- lib/gatekeeper/helpers/authentication.rb
Instance Method Summary collapse
Instance Method Details
#current_user? ⇒ Boolean
4 5 6 |
# File 'lib/gatekeeper/helpers/authentication.rb', line 4 def current_user? session[:sso] && !session[:sso][:user_id].nil? end |
#is_admin? ⇒ Boolean
8 9 10 |
# File 'lib/gatekeeper/helpers/authentication.rb', line 8 def is_admin? (session[:sso][:is_admin?]=='true') end |
#is_manager_for?(hotink_account_id) ⇒ Boolean
12 13 14 |
# File 'lib/gatekeeper/helpers/authentication.rb', line 12 def is_manager_for?(hotink_account_id) (session[:sso]["account_#{hotink_account_id.to_s}_manager".to_sym]=='true') end |