Altered install scripts to add a base user in the seed data. Also altered install script to correctly accept a 6th parameter. Edited mip_security.authorize so that if no data is returned the system returns false.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2894 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2007-11-27 18:39:27 +00:00
parent 7877296419
commit 4e275aa855
7 changed files with 136 additions and 38 deletions

View File

@@ -8,6 +8,12 @@ sqlplus %1 @disable_constraints
sqlplus %1 @delete_tables
sqlldr %1 control=prty
sqlldr %1 control=parl
sqlldr %1 control=apau
sqlldr %1 control=alty
sqlldr %1 control=caco
@@ -60,6 +66,8 @@ sqlldr %1 control=poco
sqlplus %1 @enable_constraints
sqlplus %1 @create_passwords
goto :done
:usage

18
Data/Seed/apau.ctl Normal file
View File

@@ -0,0 +1,18 @@
LOAD DATA
INFILE *
INTO TABLE apex_authorization
REPLACE
FIELDS TERMINATED BY '|'
(
rt_code
,component_name
,component_type
,privilege
)
BEGINDATA
MIPADMIN|10|P|A
MIPADMIN|32|P|A
MIPADMIN|21|P|A
MIPADMIN|20|P|A
MIPADMIN|13|P|A
MIPADMIN|11|P|A

View File

@@ -0,0 +1,21 @@
DECLARE
l_hash varchar2(240);
BEGIN
FOR l_pwd IN (SELECT id, username
FROM parties
WHERE username IS NOT NULL) LOOP
l_hash := mip_security.get_hash(p_username=>l_pwd.username, p_password=>'password');
INSERT INTO passwords
(prty_id
,password_hash
,created_on)
VALUES
(l_pwd.id
,l_hash
,SYSDATE);
END LOOP;
END;
/
exit

16
Data/Seed/parl.ctl Normal file
View File

@@ -0,0 +1,16 @@
LOAD DATA
INFILE *
INTO TABLE party_roles
REPLACE
FIELDS TERMINATED BY '|'
(
prty_id
,rt_code
,id
,start_date
,end_date
,description
)
BEGINDATA
100|MIPADMIN|1001|08-NOV-07|||

29
Data/Seed/prty.ctl Normal file
View File

@@ -0,0 +1,29 @@
LOAD DATA
INFILE *
INTO TABLE parties
REPLACE
FIELDS TERMINATED BY '|'
(
manu_ref
,created_by
,shortcode
,name
,description
,created_on
,updated_on
,updated_by
,mktp_ref
,lt_7b_contract_ref
,gt_7b_contract_ref
,adversarial_contract_ref
,username
,status
,first_name
,last_name
,personal_title
,comments
,id
,prty_type
)
BEGINDATA
|advantica||||08-NOV-07|||||||advantica|OPEN|Advantica|User|Mr|User|100|PERS