| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- FOR EACH benutzer:
- FIND users
- WHERE users.user_name = benutzer.benutzer NO-ERROR.
- IF NOT AVAILABLE users THEN
- DO:
- CREATE users.
- ASSIGN
- users.user_name = benutzer.benutzer.
- END.
- ASSIGN
- users.display_name = benutzer.anzeige
- users.ROLE = (IF benutzer.admin THEN 'admin' ELSE 'user')
- users.ACTIVE = TRUE
- users.language_id = benutzer.sprcd
- users.company = benutzer.firma
- .
- END.
- FOR EACH Sprache:
- FIND LANGUAGES
- WHERE LANGUAGES.language_id = Sprache.Sprcd.
- IF NOT AVAILABLE LANGUAGES THEN
- DO:
- CREATE LANGUAGES.
- ASSIGN LANGUAGES.language_id = Sprache.Sprcd.
- END.
- ASSIGN
- LANGUAGES.LANGUAGE_name = Sprache.Bez.
- END.
- FOR EACH Mandant:
- FIND companies
- WHERE companies.company = Mandant.Firma.
- IF NOT AVAILABLE companies THEN
- DO:
- CREATE companies.
- ASSIGN companies.company = Mandant.Firma.
- END.
- ASSIGN
- companies.company_name = Mandant.NAME.
- END.
- FOR EACH Berecht:
- FIND userauthorization
- WHERE userauthorization.company = berecht.mandant
- AND userauthorization.user_name = berecht.benutzer
- AND userauthorization.program = berecht.programm NO-ERROR.
- IF NOT AVAILABLE userauthorization THEN
- DO:
- CREATE userauthorization.
- ASSIGN
- userauthorization.company = berecht.mandant
- userauthorization.user_name = berecht.benutzer
- userauthorization.program = berecht.programm.
- END.
- ASSIGN
- userauthorization.lcreate = berecht.pwe
- userauthorization.ldelete = berecht.pwl
- userauthorization.lquery = berecht.pwa
- userauthorization.lspecial = berecht.pws
- userauthorization.lupdate = berecht.pwm.
- END.
|