Class: ODDB::State::Admin::CompanyRegistration

Inherits:
Registration show all
Defined in:
src/state/admin/companyuser.rb,
src/state/admin/registration.rb

Constant Summary

Constants inherited from Registration

SELECT_STATE, VIEW

Constants included from FachinfoMethods

FI_FILE_DIR

Constants inherited from Global

HOME_STATE, ZONE

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 included from RegistrationMethods

#do_update

Methods included from FachinfoMethods

#assign_fachinfo

Methods inherited from Global

#zone_navigation

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #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, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Boolean) allowed?

Returns:

  • (Boolean)


197
198
199
# File 'src/state/admin/registration.rb', line 197

def allowed?
  @session.allowed?('edit', @model.company)
end

- (Object) init



191
192
193
194
195
196
# File 'src/state/admin/registration.rb', line 191

def init
  super
  unless(allowed?)
    @default_view = View::Admin::Registration
  end
end

- (Object) new_patent



200
201
202
203
204
# File 'src/state/admin/registration.rb', line 200

def new_patent
  if(allowed?)
    super
  end
end

- (Object) new_sequence



205
206
207
208
209
# File 'src/state/admin/registration.rb', line 205

def new_sequence
  if(allowed?)
    super
  end
end

- (Object) resolve_company(hash)



210
211
212
213
214
# File 'src/state/admin/registration.rb', line 210

def resolve_company(hash)
  if(@model.is_a?(Persistence::CreateItem))
    hash.store(:company, @session.user.model.oid)
  end
end

- (Object) update



215
216
217
218
219
# File 'src/state/admin/registration.rb', line 215

def update
  if(allowed?)
    super
  end
end