Class: ODDB::State::Companies::UserCompany

Inherits:
Company show all
Defined in:
src/state/admin/root.rb,
src/state/admin/companyuser.rb,
src/state/companies/company.rb,
src/state/admin/powerlinkuser.rb

Direct Known Subclasses

PowerLinkCompany, RootCompany

Constant Summary

VIEW =
View::Companies::UserCompany
LOGO_PATH =
File.expand_path('../../../doc/resources/logos',
File.dirname(__FILE__))

Constants inherited from Company

LIMITED, VIEW

Constants inherited from Global

HOME_STATE, ZONE, ZONE_NAVIGATION

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 Method Summary (collapse)

Methods inherited from Company

#snapback_event

Methods inherited from Global

#limit_state

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 Admin::LoginMethods

#autologin, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Object) set_pass



24
25
26
27
28
29
# File 'src/state/companies/company.rb', line 24

def set_pass
  update() # save user input
  if(allowed? && !error?)
    State::Companies::SetPass.new(@session, user_or_creator)
  end
end

- (Object) update



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'src/state/companies/company.rb', line 30

def update
  unless(@session.allowed?('edit', @model.pointer.to_yus_privilege))
    return State::Companies::Company.new(@session, @model) 
  end
  keys = [
    :address,
    :address_email,
    :business_area,
    :complementary_type,
    :contact,
    :contact_email,
    :ean13,
    :fax,
    :fi_status,
    :generic_type,
    :pi_status,
    :city,
    :logo_file,
    :name,
    :phone,
    :plz,
    :regulatory_email,
    :url,
  ]
  do_update(keys)
end