Module: UcbRailsUser

Defined in:
app/models/ucb_rails_user/user_session_manager/test_session_manager.rb,
lib/ucb_rails_user.rb,
lib/ucb_rails_user/engine.rb,
lib/ucb_rails_user/version.rb,
lib/ucb_rails_user/spec_helpers.rb,
app/helpers/ucb_rails_user/users_helper.rb,
app/models/ucb_rails_user/configuration/cas.rb,
app/models/ucb_rails_user/configuration/ldap.rb,
app/models/ucb_rails_user/configuration/email.rb,
app/models/ucb_rails_user/configuration/configuration.rb,
app/models/ucb_rails_user/user_session_manager/in_people_ou.rb,
app/models/ucb_rails_user/configuration/exception_notification.rb,
app/models/ucb_rails_user/user_session_manager/admin_in_user_table.rb,
app/models/ucb_rails_user/user_session_manager/active_in_user_table.rb,
app/models/ucb_rails_user/user_session_manager/ldap_person_user_wrapper.rb,
app/models/ucb_rails_user/user_session_manager/in_people_ou_add_to_users_table.rb

Overview

Session manager designed to be used in tests. This bypasses the usual LDAP lookup when given a uid, and instead simply looks up the user in the current database.

This assumes that the user already exists in the database, so your test scenario should set that up before attempting a login

Defined Under Namespace

Modules: Configuration, LdapPerson, SpecHelpers, UserSearch, UserSessionManager, UsersHelper Classes: Engine, HomeController, Impersonation, ImpersonationsController, SessionsController, UserLdapService, UsersController

Constant Summary collapse

VERSION =
'3.0.0'

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/ucb_rails_user/engine.rb', line 16

def self.[](key)
  setting = config.send(key)

  if setting.is_a?(Proc)
    setting.call
  else
    setting
  end

rescue NameError
  Rails.logger.debug "[UcbRailsUser] Tried to access unknown UcbRailsUser.config key: #{key.inspect}"
  nil

end

.config {|Engine.config| ... } ⇒ Object

Yields:



11
12
13
14
# File 'lib/ucb_rails_user/engine.rb', line 11

def self.config(&block)
  yield Engine.config if block
  Engine.config
end

.loggerObject



13
14
15
# File 'lib/ucb_rails_user.rb', line 13

def self.logger
  Rails.logger
end