Module: Gatekeeper::Helpers::Authentication

Defined in:
lib/gatekeeper/helpers/authentication.rb

Instance Method Summary collapse

Instance Method Details

#current_user?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/gatekeeper/helpers/authentication.rb', line 12

def is_manager_for?()
  (session[:sso]["account_#{.to_s}_manager".to_sym]=='true')
end