New tables:
PASSWORDS - holds history of passwords for parties ACCESS_CONTROLS - hold page, item / role information for authorization purposes. Modified tables: ENQUIRIES - meter size removed. Replaced by foreign key to METER_SIZE_CODES. COSTS - includes AICO_CODE and DESCRIPTION for use as cost details for Additional Items. General modifications: Yes/No columns modified to VARCHAR2(3) Modules: Added mip_security.pck. Supports Authentication and Authorization (update of the original POC version) Respository: Created new directory structure to hold persistent data. Currently includes Data/Seed for base table values and Data/Demo to populate various party and relationship tables. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2838 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
23
Data/Demo/InstallDemoData.cmd
Normal file
23
Data/Demo/InstallDemoData.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
|
||||
if "%1"=="" goto :usage
|
||||
if "%1"=="sys" goto :usage
|
||||
if "%1"=="system" goto :usage
|
||||
|
||||
sqlplus %1 @delete_demo_data
|
||||
|
||||
sqlldr %1 control=prty
|
||||
|
||||
sqlldr %1 control=parl
|
||||
|
||||
sqlldr %1 control=prel
|
||||
|
||||
sqlplus %1 @create_passwords
|
||||
|
||||
goto :done
|
||||
|
||||
:usage
|
||||
|
||||
echo usage InstallDemoData user/password@database
|
||||
|
||||
:done
|
||||
22
Data/Demo/create_passwords.sql
Normal file
22
Data/Demo/create_passwords.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
DECLARE
|
||||
l_hash dbms_obfuscation_toolkit.varchar2_checksum;
|
||||
BEGIN
|
||||
FOR l_pwd IN (SELECT id
|
||||
,upper(username) || '/' || upper(username) AS str
|
||||
FROM parties
|
||||
WHERE username IS NOT NULL) LOOP
|
||||
|
||||
l_hash := dbms_obfuscation_toolkit.md5(input_string => l_pwd.str);
|
||||
|
||||
INSERT INTO passwords
|
||||
(prty_id
|
||||
,password_hash
|
||||
,created_on)
|
||||
VALUES
|
||||
(l_pwd.id
|
||||
,l_hash
|
||||
,SYSDATE);
|
||||
END LOOP;
|
||||
END;
|
||||
/
|
||||
exit
|
||||
5
Data/Demo/delete_demo_data.sql
Normal file
5
Data/Demo/delete_demo_data.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
delete from party_relationships;
|
||||
delete from party_roles;
|
||||
delete from passwords;
|
||||
delete from parties;
|
||||
exit
|
||||
38
Data/Demo/parl.ctl
Normal file
38
Data/Demo/parl.ctl
Normal file
@@ -0,0 +1,38 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE party_roles
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
prty_id
|
||||
,rt_code
|
||||
,id
|
||||
,start_date
|
||||
,end_date
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
200|SUPP|2001|08-NOV-07|||
|
||||
201|SUPP|2011|08-NOV-07|||
|
||||
202|SUPP|2021|08-NOV-07|||
|
||||
203|SUPP|2031|08-NOV-07|||
|
||||
204|SUPP|2041|08-NOV-07|||
|
||||
205|SUPP|2051|08-NOV-07|||
|
||||
206|SUPP|2061|08-NOV-07|||
|
||||
207|SUPP|2071|08-NOV-07|||
|
||||
208|SUPP|2081|08-NOV-07|||
|
||||
400|MIPADMIN|4001|08-NOV-07|||
|
||||
400|CS|4002|08-NOV-07|||
|
||||
400|ICU|4003|08-NOV-07|||
|
||||
401|MIPADMIN|4011|08-NOV-07|||
|
||||
401|CS|4012|08-NOV-07|||
|
||||
401|ICU|4013|08-NOV-07|||
|
||||
402|MIPADMIN|4021|08-NOV-07|||
|
||||
403|MIPADMIN|4031|08-NOV-07|||
|
||||
404|AGENT|4041|08-NOV-07|||
|
||||
404|SUPPADMIN|4042|08-NOV-07|||
|
||||
405|AGENT|4051|08-NOV-07|||
|
||||
405|SUPPADMIN|4052|08-NOV-07|||
|
||||
406|AGENT|4061|08-NOV-07|||
|
||||
407|AGENT|4071|08-NOV-07|||
|
||||
408|AGENT|4081|08-NOV-07|||
|
||||
44
Data/Demo/prel.ctl
Normal file
44
Data/Demo/prel.ctl
Normal file
@@ -0,0 +1,44 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE party_relationships
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
from_parl_id
|
||||
,to_parl_id
|
||||
,from_parl_prty_id
|
||||
,to_parl_prty_id
|
||||
,from_parl_rt_code
|
||||
,to_parl_rt_code
|
||||
,start_date
|
||||
,from_prtp_rt_code
|
||||
,to_prtp_rt_code
|
||||
)
|
||||
BEGINDATA
|
||||
4041|2001|404|200|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4041|2011|404|201|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4041|2021|404|202|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4042|2001|404|200|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2011|404|201|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2021|404|202|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2031|404|203|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2041|404|204|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2051|404|205|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4051|2001|405|200|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4051|2011|405|201|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4051|2021|405|202|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4052|2031|405|203|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2041|405|204|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2051|405|205|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2061|405|206|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2071|405|207|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2081|405|208|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4061|2031|406|203|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4061|2041|406|204|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4061|2051|406|205|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2031|407|203|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2041|407|204|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2051|407|205|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2061|408|206|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2071|408|207|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2081|408|208|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
59
Data/Demo/prty.ctl
Normal file
59
Data/Demo/prty.ctl
Normal file
@@ -0,0 +1,59 @@
|
||||
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
|
||||
ACT|hardya||ACTARIS||08-NOV-07||||||||||||Manufactures meters|100|MANU
|
||||
DRE|hardya||DRESSER||08-NOV-07||||||||||||Manufactures meters|101|MANU
|
||||
QUI|hardya||QUINSHIELD||08-NOV-07||||||||||||Manufactures meters|102|MANU
|
||||
|hardya|NS1|Northern Supplies||08-NOV-07|||NSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the north of the UK|200|MKTP
|
||||
|hardya|NS2|Extreme Northern Supplies||08-NOV-07|||ENSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the extreme north of the UK|201|MKTP
|
||||
|hardya|WS1|Welsh Supplies||08-NOV-07|||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Wales|202|MKTP
|
||||
|hardya|WS2|Welsh Supplies||08-NOV-07|||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Wales|203|MKTP
|
||||
|hardya|CE1|Central Gas Supplies||08-NOV-07|||CGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the Central region|204|MKTP
|
||||
|hardya|CE2|Centre de Gas Supplies||08-NOV-07|||CDSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the Central region|205|MKTP
|
||||
|hardya|LON|London Supplies||08-NOV-07|||LONSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to London|206|MKTP
|
||||
|hardya|KER|Kernow Supplies||08-NOV-07|||KERSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Cornwall|207|MKTP
|
||||
|hardya|BM|Bootiful Gas Supplies||08-NOV-07|||BGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the East|208|MKTP
|
||||
|hardya||National Grid||08-NOV-07||||||||||||Internal organization|300|IO
|
||||
|hardya||National Grid Metering||08-NOV-07||||||||||||Internal organization|301|IO
|
||||
|hardya||Customer Services||08-NOV-07||||||||||||Internal organization|302|IO
|
||||
|hardya||Quotations||08-NOV-07||||||||||||Internal organization|303|IO
|
||||
|hardya||||08-NOV-07|||||||hardya|OPEN|Andrew|Hardy|Mr|User|400|PERS
|
||||
|hardya||||08-NOV-07|||||||priestj|OPEN|Jamie|Priest|Mr|User|401|PERS
|
||||
|hardya||||08-NOV-07|||||||kanagasabapathy|OPEN|Dharshani|Kanagasabapathy||User|402|PERS
|
||||
|hardya||||08-NOV-07|||||||mullend|OPEN|Matt|Mullen||User|403|PERS
|
||||
|hardya||||08-NOV-07|||||||agent1|OPEN|Fred|Smith||User|404|PERS
|
||||
|hardya||||08-NOV-07|||||||agent2|OPEN|Joe|Bloggs||User|405|PERS
|
||||
|hardya||||08-NOV-07|||||||agent3|OPEN|Peter|Piper||User|406|PERS
|
||||
|hardya||||08-NOV-07|||||||agent4|OPEN|Nigel|Normal||User|407|PERS
|
||||
|hardya||||08-NOV-07|||||||agent5|OPEN|Norah|Batty||User|408|PERS
|
||||
|hardya||||08-NOV-07|||||||cs1|OPEN|Henrietta|Helpful||User|409|PERS
|
||||
|hardya||||08-NOV-07|||||||cs2|OPEN|Tommy|Atkins||User|410|PERS
|
||||
|hardya||||08-NOV-07|||||||cs3|OPEN|Tracy|Beaker||User|411|PERS
|
||||
|hardya||||08-NOV-07|||||||ic1|OPEN|Gareth|Thomas||User|412|PERS
|
||||
|hardya||||08-NOV-07|||||||ic2|OPEN|Bhavesh|Singh||User|413|PERS
|
||||
|hardya||||08-NOV-07|||||||ic3|OPEN|Dave|Smith||User|414|PERS
|
||||
Reference in New Issue
Block a user