From 58ce4a8a6f1593cd5b6c3c3c9c5d75387038d600 Mon Sep 17 00:00:00 2001 From: abrahamdennis Date: Wed, 28 Aug 2024 15:45:59 +0100 Subject: [PATCH] PO-661 created additional users in Opal to match those created in Legacy GoB to use to test more scenarios --- ...0240828_238__increase_user_description.sql | 16 + ...V20240828_239__create_additional_users.sql | 163 ++++ ..._240__create_additional_bus_unit_users.sql | 183 +++++ ...1__insert_additional_user_entitlements.sql | 702 ++++++++++++++++++ 4 files changed, 1064 insertions(+) create mode 100644 src/main/resources/db/migration/V20240828_238__increase_user_description.sql create mode 100644 src/main/resources/db/migration/V20240828_239__create_additional_users.sql create mode 100644 src/main/resources/db/migration/V20240828_240__create_additional_bus_unit_users.sql create mode 100644 src/main/resources/db/migration/V20240828_241__insert_additional_user_entitlements.sql diff --git a/src/main/resources/db/migration/V20240828_238__increase_user_description.sql b/src/main/resources/db/migration/V20240828_238__increase_user_description.sql new file mode 100644 index 00000000..2f1f5e88 --- /dev/null +++ b/src/main/resources/db/migration/V20240828_238__increase_user_description.sql @@ -0,0 +1,16 @@ +/** +* OPAL Program +* +* MODULE : increase_user_description.sql +* +* DESCRIPTION : Increase the size of the description column in USERS table to allow for more details of what the user can do. +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- --------------------------------------------------------------------------------------------------------- +* 28/08/2024 A Dennis 1.0 PO-661 Increase the size of the description column in USERS table to allow for more details of what the user can do. +* +**/ +ALTER TABLE USERS +ALTER COLUMN description TYPE varchar(300); diff --git a/src/main/resources/db/migration/V20240828_239__create_additional_users.sql b/src/main/resources/db/migration/V20240828_239__create_additional_users.sql new file mode 100644 index 00000000..5ba55e10 --- /dev/null +++ b/src/main/resources/db/migration/V20240828_239__create_additional_users.sql @@ -0,0 +1,163 @@ +/** +* OPAL Program +* +* MODULE : create_additional_users.sql +* +* DESCRIPTION : Create more users to enable us have different users with business units to test more scenarios. Some of these are users that also exist in Legacy GoB. +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- --------------------------------------------------------------------------------------------------------- +* 28/08/2024 A Dennis 1.0 PO-661 Inserts rows of data into the USERS table. These are users that also exist in Legacy GoB. +* +**/ +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000004 +,'opal-test-5@HMCTS.NET' +,'5N1VKPdZbc34capVz8zFPA==!' +,'Recreating in Opal a User that belongs to Dyfed Powys business unit in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000005 +,'opal-test-6@HMCTS.NET' +,'40CEMsGkilL7bHTZJrOIhg==!' +,'Recreating in Opal a User that belongs to North Wales business unit in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000006 +,'opal-test-7@HMCTS.NET' +,'N4oGO4/bHblB409L3lhMfQ==!' +,'Recreating in Opal a User that belongs to Gwent business unit in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000007 +,'opal-test-8@HMCTS.NET' +,'J3p4/AXIhkoXDppWzuq8TA==!' +,'Recreating in Opal a User that belongs to South Wales business unit in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000008 +,'opal-test-9@HMCTS.NET' +,'138Adm/Tvj8hichDpq8/sg==!' +,'Recreating in Opal a User that belongs to Greater Manchester and North West Confiscation Unit business units in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000009 +,'opal-test-10@HMCTS.NET' +,'Wn+WPl4FBHQMOmsQu21PpQ==!' +,'Recreating in Opal a User that belongs to 7 London business units in Legacy GoB' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000010 +,'opal-test-11@HMCTS.NET' +,NULL +,'NOT YET IN BUSINESS UNITS' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000011 +,'opal-test-12@HMCTS.NET' +,NULL +,'NOT YET IN BUSINESS UNITS' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000012 +,'opal-test-13@HMCTS.NET' +,NULL +,'NOT YET IN BUSINESS UNITS' +); + +INSERT INTO users +( + user_id +,username +,password +,description +) +VALUES +( + 500000013 +,'opal-test-14@HMCTS.NET' +,NULL +,'NOT YET IN BUSINESS UNITS' +); \ No newline at end of file diff --git a/src/main/resources/db/migration/V20240828_240__create_additional_bus_unit_users.sql b/src/main/resources/db/migration/V20240828_240__create_additional_bus_unit_users.sql new file mode 100644 index 00000000..5230529e --- /dev/null +++ b/src/main/resources/db/migration/V20240828_240__create_additional_bus_unit_users.sql @@ -0,0 +1,183 @@ +/** +* OPAL Program +* +* MODULE : create_additional_bus_unit_users.sql +* +* DESCRIPTION : Inserts rows of data into the BUSINESS_UNIT_USERS table to match that in Legacy GoB. +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- --------------------------------------------------------------------------------------------------------- +* 28/08/2024 A Dennis 1.0 PO-661 Inserts rows of data into the BUSINESS_UNIT_USERS table to match that in Legacy GoB +* +**/ + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L060FO' + ,53 + ,500000004 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L106CO' + ,78 + ,500000005 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L089BO' + ,58 + ,500000006 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L036DO' + ,85 + ,500000007 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L045EO' + ,57 + ,500000008 + ); + + INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L082EO' + ,79 + ,500000008 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L065AO' + ,70 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L066AO' + ,68 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L067AO' + ,73 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L073AO' + ,71 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L077AO' + ,67 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L078AO' + ,69 + ,500000009 + ); + +INSERT INTO BUSINESS_UNIT_USERS + ( + business_unit_user_id + ,business_unit_id + ,user_id + ) +VALUES + ( + 'L080AO' + ,61 + ,500000009 + ); diff --git a/src/main/resources/db/migration/V20240828_241__insert_additional_user_entitlements.sql b/src/main/resources/db/migration/V20240828_241__insert_additional_user_entitlements.sql new file mode 100644 index 00000000..1a917c23 --- /dev/null +++ b/src/main/resources/db/migration/V20240828_241__insert_additional_user_entitlements.sql @@ -0,0 +1,702 @@ +/** +* OPAL Program +* +* MODULE : insert_additional_user_entitlements.sql +* +* DESCRIPTION : Inserts rows of data into the USER_ENTITLEMENTS table for +* Account Enquiry - Account Notes +* Account Enquiry +* Manual Account Creation which is TFO IN in Legacy Gob. +* Collection Order +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------- +* 28/08/2024 A Dennis 1.0 PO-661 Inserts rows of data into the USER_ENTITLEMENTS table for Account Enquiry - Account Notes, Account Enquiry, Manual Account Creation, Collection Order. +* +**/ + +-- ===================== Account Enquiry ================================================ + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 393217 + ,'L060FO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 383967 + ,'L065AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384213 + ,'L066AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384459 + ,'L067AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 386181 + ,'L073AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388395 + ,'L077AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388149 + ,'L078AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388641 + ,'L080AO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 392162 + ,'L045EO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 391424 + ,'L082EO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389274 + ,'L089BO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389591 + ,'L106CO' + ,54 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 390154 + ,'L036DO' + ,54 + ); + +-- ======================= Account Enquiry - Account Notes =========================== + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 393219 + ,'L060FO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 383969 + ,'L065AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384215 + ,'L066AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384461 + ,'L067AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 386183 + ,'L073AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388397 + ,'L077AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388151 + ,'L078AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388643 + ,'L080AO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 392164 + ,'L045EO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 391426 + ,'L082EO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389276 + ,'L089BO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389593 + ,'L106CO' + ,41 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 390156 + ,'L036DO' + ,41 + ); + +-- ====================== Manual Account Creation =============================================== + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 393452 + ,'L060FO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384202 + ,'L065AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384448 + ,'L066AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 384694 + ,'L067AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 386416 + ,'L073AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388630 + ,'L077AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388384 + ,'L078AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 388876 + ,'L080AO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 392397 + ,'L045EO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 391659 + ,'L082EO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389509 + ,'L089BO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 389826 + ,'L106CO' + ,35 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 390389 + ,'L036DO' + ,35 + ); + + -- ====================== Collection Order =============================================== + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500010 + ,'L060FO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500011 + ,'L065AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500012 + ,'L066AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500013 + ,'L067AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500014 + ,'L073AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500015 + ,'L077AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500016 + ,'L078AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500017 + ,'L080AO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500018 + ,'L045EO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500019 + ,'L082EO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500020 + ,'L089BO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500021 + ,'L106CO' + ,500 + ); + +INSERT INTO user_entitlements + ( + user_entitlement_id + ,business_unit_user_id + ,application_function_id + ) +VALUES + ( + 500022 + ,'L036DO' + ,500 + );