Sha256: 4f4c1ec54f5a86f6ff9ba37723982e74ae6b173b9d48c200f718e9f30e77ccdc

Contents?: true

Size: 934 Bytes

Versions: 6

Compression:

Stored size: 934 Bytes

Contents

class UcbRails::UserSessionManager::Base
  attr_accessor :uid
  
  def login(uid)
    raise NotImplementedError
  end
  
  def current_user(uid)
    raise NotImplementedError
  end
  
  def log_request(user)
  end
  
  def logout(user)
  end

  def people_ou_entry(uid_in=nil)
    self.uid = uid_in if uid_in.present?
    
    @people_ou_entry ||= begin
      if @people_ou_entry = UcbRails::LdapPerson::Finder.find_by_uid(uid)
        @people_ou_entry
      else
        UcbRails.logger.debug "#{self.class} people_ou_entry not found for uid: #{uid.inspect}"
        nil
      end
    end
  end
  
  private
  
  def active_user
    @active_user ||= UcbRails::User.active.find_by_uid(uid)
  end
  
  def active_admin_user
    @active_user ||= UcbRails::User.active.admin.find_by_uid(uid)
  end

  def ldap_person_user_wrapper(ldap_person_entry)
    UcbRails::UserSessionManager::LdapPersonUserWrapper.new(ldap_person_entry)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ucb_rails-0.0.7 app/models/ucb_rails/user_session_manager/base.rb
ucb_rails-0.0.6 app/models/ucb_rails/user_session_manager/base.rb
ucb_rails-0.0.5 app/models/ucb_rails/user_session_manager/base.rb
ucb_rails-0.0.4 app/models/ucb_rails/user_session_manager/base.rb
ucb_rails-0.0.3 app/models/ucb_rails/user_session_manager/base.rb
ucb_rails-0.0.2 app/models/ucb_rails/user_session_manager/base.rb