Class: ODDB::State::Admin::TransparentLogin

Inherits:
Login show all
Defined in:
src/state/admin/login.rb,
test/test_state/global.rb

Constant Summary

Constants inherited from Login

DIRECT_EVENT, SNAPBACK_EVENT, VIEW

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #password_reset, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zone_navigation, #zones

Methods included from LoginMethods

#autologin

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Attribute Details

- (Object) desired_event

Returns the value of attribute desired_event



66
67
68
# File 'src/state/admin/login.rb', line 66

def desired_event
  @desired_event
end

Instance Method Details

- (Object) init



19
20
21
22
# File 'test/test_state/global.rb', line 19

def init
  @session.app.state_transp_called = true
  super
end

- (Object) login



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'src/state/admin/login.rb', line 67

def 
  autologin(@session., self)
  if(@model.respond_to?(:pointer))
    klass = resolve_state(@model.pointer)
    newstate = klass.new(@session, @model)
    newstate.extend(@viral_module)
    newstate
  else
    trigger(@desired_event)
  end
rescue Yus::UnknownEntityError
  @errors.store(:email, create_error(:e_authentication_error, :email, nil))
  self
rescue Yus::AuthenticationError
  @errors.store(:pass, create_error(:e_authentication_error, :pass, nil))
  self
end