From a748bbece573135453d5f0d0b458158362fe1fea Mon Sep 17 00:00:00 2001 From: Alexandre Morin <alexandre.morin@maarch.org> Date: Mon, 19 Feb 2018 16:21:26 +0100 Subject: [PATCH] Dataset AP --- data/sql/pgsql/auth.sql | 18 +++++++----- data/sql/pgsql/contact.sql | 19 +++--------- data/sql/pgsql/medona.sql | 6 ++-- data/sql/pgsql/organization.sql | 52 ++++++++++++++++++--------------- 4 files changed, 47 insertions(+), 48 deletions(-) diff --git a/data/sql/pgsql/auth.sql b/data/sql/pgsql/auth.sql index db134e2f..dfa1c6c1 100644 --- a/data/sql/pgsql/auth.sql +++ b/data/sql/pgsql/auth.sql @@ -8,7 +8,7 @@ INSERT INTO "auth"."account" ("accountType", "accountId", "lastName", "firstName ('user', 'superadmin', 'Super', 'Admin', 'M.', 'super admin', 'superadmin', 'info@maarch.org', '186cf774c97b60a1c106ef718d10970a6a06e06bef89553d9ae65d938a886eae',true,false,null,false,0,null,null,null), ('user', 'bblier', 'BLIER', 'Bernard', 'M.', 'Bernard BLIER', 'bblier', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'aastier', 'ASTIER', 'Alexandre', 'M.', 'Alexandre ASTIER', 'aastier', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), - --('user', 'rreynolds', 'REYNOLDS', 'Ryan', 'M.', 'Ryan REYNOLDS', 'rreynolds', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), + ('user', 'rreynolds', 'REYNOLDS', 'Ryan', 'M.', 'Ryan REYNOLDS', 'rreynolds', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), ('user', 'aadams', 'ADAMS', 'Amy', 'Mme.', 'Amy ADAMS', 'aadams', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), ('user', 'ppreboist', 'PREBOIST', 'Paul', 'M.', 'Paul PREBOIST', 'ppreboist', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), ('user', 'ccox', 'COX', 'Courtney', 'Mme.', 'Courtney COX', 'ccox', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), @@ -33,15 +33,15 @@ INSERT INTO "auth"."account" ("accountType", "accountId", "lastName", "firstName --('user', 'jjonasz', 'JONASZ', 'Jean', 'M.', 'Jean JONASZ', 'jjonasz', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'ggrand', 'GRAND', 'George', 'M.', 'George GRAND', 'ggrand', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'ccamus', 'CAMUS', 'Cyril', 'M.', 'Cyril CAMUS', 'ccamus', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), - --('user', 'hhier', 'HIER', 'Hubert', 'M.', 'Hubert HIER', 'hhier', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), + ('user', 'hhier', 'HIER', 'Hubert', 'M.', 'Hubert HIER', 'hhier', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'ttule', 'TULE', 'Thierry', 'M.', 'Thierry TULE', 'ttule', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'kkrach', 'KRACH', 'Kevin', 'M.', 'Kevin KRACH', 'kkrach', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'ddenis', 'DENIS', 'Didier', 'M.', 'Didier DENIS', 'ddenis', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'aalambic', 'ALAMBIC', 'Alain', 'M.', 'Alain ALAMBIC', 'aalambic', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), --('user', 'ppacioli', 'PACIOLI', 'Paolo', 'M.', 'Paolo PACIOLI', 'ppacioli', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), - --('user', 'vvictoire', 'VICTOIRE', 'Victor', 'M.', 'Victor VICTOIRE', 'vvictoire', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), + ('user', 'vvictoire', 'VICTOIRE', 'Victor', 'M.', 'Victor VICTOIRE', 'vvictoire', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), ('user', 'ddaull', 'DAULL', 'Denis', 'M.', 'Denis DAULL', 'ddaull', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), - --('user', 'bboule', 'BOULE', 'Bruno', 'M.', 'Bruno BOULE', 'bboule', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), + ('user', 'bboule', 'BOULE', 'Bruno', 'M.', 'Bruno BOULE', 'bboule', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null), ('user', 'bbain', 'BAIN', 'Barbara', 'Mme.', 'Barbara BAIN', 'bbain', 'info@maarch.org', 'fffd2272074225feae229658e248b81529639e6199051abdeb49b6ed60adf13d',true,false,null,false,0,null,null,null); INSERT INTO "auth"."account" ("accountType", "accountId", "displayName", "accountName", "emailAddress", "enabled") VALUES @@ -81,14 +81,18 @@ INSERT INTO "auth"."servicePrivilege"("accountId", "serviceURI") VALUES INSERT INTO "auth"."roleMember"("roleId", "userAccountId") VALUES ('ADMIN', 'superadmin'), ('ARCHIVISTE', 'bblier'), + ('ARCHIVISTE', 'ddaull'), + ('ARCHIVISTE', 'hhier'), ('PRODUCTEUR', 'ppreboist'), ('PRODUCTEUR', 'ccox'), ('PRODUCTEUR', 'sstone'), + ('PRODUCTEUR', 'bbain'), ('CONTROL', 'sstallone'), ('SERVICE_VERSANT', 'cchaplin'), - ('UTILISATEUR', 'aadams'), - ('UTILISATEUR', 'bbain'), - ('UTILISATEUR', 'ddaull'); + ('UTILISATEUR', 'bboule'), + ('UTILISATEUR', 'vvictoire'), + ('UTILISATEUR', 'rreynolds'), + ('UTILISATEUR', 'aadams'); -- privilege diff --git a/data/sql/pgsql/contact.sql b/data/sql/pgsql/contact.sql index 4a1c4e16..49d5c849 100644 --- a/data/sql/pgsql/contact.sql +++ b/data/sql/pgsql/contact.sql @@ -18,24 +18,13 @@ INSERT INTO "contact"."contact" ("contactId", "contactType", "orgName", "firstName", "lastName", "title", "function", "service", "displayName") VALUES ('Bblier_ACME', 'person', null, 'Bernard', 'BLIER', 'M.', 'Responsable du service de tiers-archivage', 'service versant', 'Bernard BLIER'), -('ACME', 'organization', 'ACME', NULL, NULL, NULL, NULL, NULL, 'ACME'), -('MAARCH_LES_BAINS_SV', 'organization', 'MAARCH LES BAINS SV', NULL, NULL, NULL, NULL, NULL, 'Service Versant'), -('MAARCH_LES_BAINS_SF', 'organization', 'MAARCH LES BAINS SF', NULL, NULL, NULL, NULL, NULL, 'Service Finance'), -('MAARCH_LES_BAINS_SJA', 'organization', 'MAARCH LES BAINS SJA', NULL, NULL, NULL, NULL, NULL, 'Service Juridique et Administratif'); +('MAARCH_LES_BAINS_SA', 'organization', 'MAARCH LES BAINS SA', NULL, NULL, NULL, NULL, NULL, 'Service Administratif'), +('MAARCH_LES_BAINS_SF', 'organization', 'MAARCH LES BAINS SF', NULL, NULL, NULL, NULL, NULL, 'Service Finance'); -- address -- INSERT INTO "contact"."address" ("addressId","contactId", "purpose", "room", "floor", "building", "number", "street", "postBox", "block", "citySubDivision", "postCode", "city", "country") VALUES ('Bblier_ACME_1', 'Bblier_ACME', 'main', '', '', '', '42', 'rue des Jardins', '', '', '', '92000', 'Nanterre', 'FR'), -('ACME_1', 'ACME', 'main', '', '', '', '42', 'rue des Jardins', '', '', '', '92000', 'Nanterre', 'FR'), -('MAARCH_LES_BAINS_SV_1', 'MAARCH_LES_BAINS_SV', 'main', '', '', '', '71', 'rue Banaudon', '', '', '', '69009', 'Lyon', 'FR'), -('MAARCH_LES_BAINS_SF_1', 'MAARCH_LES_BAINS_SF', 'main', '', '', '', '33', 'boulevard de Prague', '', '', '', '79000', 'Niort', 'FR'), -('MAARCH_LES_BAINS_SJA_1', 'MAARCH_LES_BAINS_SJA', 'main', '', '', '', '90', 'rue de Groussay', '', '', '', '12000', 'Rodez', 'FR'); - --- communication -- -INSERT INTO "contact"."communication" -("communicationId", "contactId", "purpose", "comMeanCode", "value", "info") VALUES -('01', 'ACME', 'main', 'TE', '04 92 96 80 80', null), -('02', 'ACME', 'main', 'FX', '04 92 96 92 96', null), -('03', 'ACME', 'main', 'EM', 'acme@maarg.org', null); \ No newline at end of file +('MAARCH_LES_BAINS_SV_1', 'MAARCH_LES_BAINS_SA', 'main', '', '', '', '71', 'rue Banaudon', '', '', '', '69009', 'Lyon', 'FR'), +('MAARCH_LES_BAINS_SF_1', 'MAARCH_LES_BAINS_SF', 'main', '', '', '', '33', 'boulevard de Prague', '', '', '', '79000', 'Niort', 'FR'); \ No newline at end of file diff --git a/data/sql/pgsql/medona.sql b/data/sql/pgsql/medona.sql index b6f5fb1d..8f8d6232 100644 --- a/data/sql/pgsql/medona.sql +++ b/data/sql/pgsql/medona.sql @@ -2,8 +2,8 @@ TRUNCATE TABLE "medona"."archivalAgreement" CASCADE; TRUNCATE TABLE "medona"."controlAuthority" CASCADE; INSERT INTO "medona"."archivalAgreement" ("archivalAgreementId", "reference", "name", "description", "archiverOrgRegNumber", "depositorOrgRegNumber", "originatorOrgIds", "beginDate", "endDate", "allowedFormats", "enabled", "archivalProfileReference", "serviceLevelReference", "maxSizeTransfer", "maxSizeDay", "maxSizeWeek", "maxSizeMonth", "maxSizeYear", "maxSizeAgreement", "signed", "autoTransferAcceptance", "processSmallArchive") VALUES -('MAARCH_LES_BAINS_ACTES', 'MAARCH_LES_BAINS_ACTES', 'Maarch les Bains (seda version 1)','Actes utilisant la version 1.0 du SEDA', 'org_123456789_Archives', 'org_987654321_DGS_Versant', 'MAARCH_LES_BAINS_SJA MAARCH_LES_BAINS_SF',null, null, 'fmt/14 fmt/15 fmt/16 fmt/17 fmt/18 fmt/19 fmt/20 fmt/95 fmt/101 fmt/189 fmt/354 fmt/412 fmt/476 fmt/477 fmt/478 fmt/479 fmt/480 fmt/481', true, 'actes', 'serviceLevel_001', null, null, null, null, null, 1000000, false, true, true), -('MAARCH_LES_BAINS_ACTES_V2', 'MAARCH_LES_BAINS_ACTES_V2', 'Maarch les Bains (seda version 2)','Actes utilisant la version 2.0 du SEDA', 'org_123456789_Archives', 'org_987654321_DGS_Versant', 'MAARCH_LES_BAINS_SJA MAARCH_LES_BAINS_SF',null, null, 'fmt/14 fmt/15 fmt/16 fmt/17 fmt/18 fmt/19 fmt/20 fmt/95 fmt/101 fmt/189 fmt/354 fmt/412 fmt/476 fmt/477 fmt/478 fmt/479 fmt/480 fmt/481', true, 'actes_v2', 'serviceLevel_001', null, null, null, null, null, 1000000, false, true, true); +('MAARCH_LES_BAINS_ACTES', 'MAARCH_LES_BAINS_ACTES', 'Maarch les Bains (seda version 1)','Actes utilisant la version 1.0 du SEDA', 'org_123456789_Archives', 'org_987654321_DGS_SA', 'MAARCH_LES_BAINS_SA MAARCH_LES_BAINS_SJ MAARCH_LES_BAINS_SF',null, null, 'fmt/14 fmt/15 fmt/16 fmt/17 fmt/18 fmt/19 fmt/20 fmt/95 fmt/101 fmt/189 fmt/276 fmt/354 fmt/412 fmt/476 fmt/477 fmt/478 fmt/479 fmt/480 fmt/481', true, 'actes', 'serviceLevel_001', null, null, null, null, null, 1000000, false, true, true), +('MAARCH_LES_BAINS_ACTES_V2', 'MAARCH_LES_BAINS_ACTES_V2', 'Maarch les Bains (seda version 2)','Actes utilisant la version 2.0 du SEDA', 'org_123456789_Archives', 'org_987654321_DGS_SA', 'MAARCH_LES_BAINS_SA MAARCH_LES_BAINS_SJ MAARCH_LES_BAINS_SF',null, null, 'fmt/14 fmt/15 fmt/16 fmt/17 fmt/18 fmt/19 fmt/20 fmt/95 fmt/101 fmt/189 fmt/276 fmt/354 fmt/412 fmt/476 fmt/477 fmt/478 fmt/479 fmt/480 fmt/481', true, 'actes_v2', 'serviceLevel_001', null, null, null, null, null, 1000000, false, true, true); INSERT INTO medona."controlAuthority"("originatorOrgUnitId", "controlAuthorityOrgUnitId") VALUES -('*','AD_92_Controle'); +('*','AD_92_AC'); diff --git a/data/sql/pgsql/organization.sql b/data/sql/pgsql/organization.sql index 704aa171..cd13d7ec 100644 --- a/data/sql/pgsql/organization.sql +++ b/data/sql/pgsql/organization.sql @@ -25,51 +25,57 @@ INSERT INTO "organization"."orgRole" ("code", "name","description") VALUES -- Organizations INSERT INTO "organization"."organization"( "orgId", "orgName", "displayName", "parentOrgId", "ownerOrgId", "orgRoleCodes", "registrationNumber", "isOrgUnit") VALUES -('AD_92', 'Archives départementales des Hauts-de-Seine', 'Archives départementales des Hauts-de-Seine', NULL, NULL, NULL, 'org_444555666', false ), -('AD_92_Controle', 'Directeur des archives départementales', 'Directeur des archives départementales', 'AD_92', 'AD_92', 'controlAuthority', 'org_444555666_controle', true ), +('AD_92', 'Archives départementales des Hauts-de-Maarch', 'Archives départementales des Hauts-de-Maarch', NULL, NULL, NULL, 'org_444555666', false ), +('AD_92_DAD', 'Directeur des archives départementales', 'Directeur des archives départementales', 'AD_92', 'AD_92', '', 'org_444555666_DAD', true ), +('AD_92_SHP', 'Service Histoire et Patrimoine', 'Service Histoire et Patrimoine', 'AD_92_DAD', 'AD_92', 'archiver', 'org_444555666_DAD_SHP', true ), +('AD_92_AC', 'Autorités de Contrôle des Archives Départementales', 'Autorités de Contrôle des Archives Départementales', 'AD_92_DAD', 'AD_92', 'controlAuthority', 'org_444555666_DAD_AC', true ), -('Dep_92', 'Département des Hauts-de-Seine', 'Département des Hauts-de-Seine', NULL, NULL, NULL, 'org_06', false ), +('Dep_92', 'Département des Hauts-de-Maarch', 'Département des Hauts-de-Maarch', NULL, NULL, NULL, 'org_92', false ), +('ACME_Archive', 'Archivage, Conservation & Mémoire Électronique','Archivage, Conservation & Mémoire Électronique', 'Dep_92', 'Dep_92', 'archiver owner', 'org_123456789_Archives', true), ('MAARCH_LES_BAINS', 'Maarch les Bains','Maarch les Bains', 'Dep_92', 'Dep_92', NULL, 'org_987654321', false), +('MAARCH_LES_BAINS_DSI', 'Direction des Systèmes d’information','Direction des Systèmes d’information', 'MAARCH_LES_BAINS', 'Dep_92', null, 'org_987654321_SI', true), ('MAARCH_LES_BAINS_DGS', 'Direction Générale des Services','Direction Générale des Services', 'MAARCH_LES_BAINS', 'Dep_92', 'originator', 'org_987654321_DGS', true), -('MAARCH_LES_BAINS_SF', 'Service Finance','Service Finance', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'originator', 'org_987654321_DGS_SF', true), -('MAARCH_LES_BAINS_SJA', 'Service Juridique et Administratif','Service Juridique et Administratif', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'originator', 'org_987654321_DGS_SJA', true), -('MAARCH_LES_BAINS_SV', 'Service Versant','Service Versant', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'depositor', 'org_987654321_DGS_Versant', true), -('MAARCH_LES_BAINS_SI', 'Service Informatique','Service Informatique', 'MAARCH_LES_BAINS_DGS', 'Dep_92', null, 'org_987654321_DGS_SI', true), +('MAARCH_LES_BAINS_SF', 'Service des Finances','Service des Finances', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'originator', 'org_987654321_DGS_SF', true), +('MAARCH_LES_BAINS_SA', 'Service Administratif','Service Administratif', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'originator depositor', 'org_987654321_DGS_SA', true), +('MAARCH_LES_BAINS_SJ', 'Service Juridique','Service Juridique', 'MAARCH_LES_BAINS_DGS', 'Dep_92', 'originator', 'org_987654321_DGS_SJ', true), +('MAARCH_LES_BAINS_CC', 'Centre Communal d’action sociale','Centre Communal d’action sociale', 'MAARCH_LES_BAINS', 'Dep_92', '', 'org_987654321_CC', true), -('ACME', 'ACME','Archivage Conversation et Mémoire Electronique', 'Dep_92', 'Dep_92', NULL, 'org_123456789', false), -('ACME_Archive', 'Service d''Archives','Service d''Archives', 'ACME', 'Dep_92', 'archiver owner', 'org_123456789_Archives', true); +('MIN_ART_CULT', 'Ministère de l''art et de la culture','Ministère de l''art et de la culture', NULL, NULL, NULL, 'org_111222333', false), +('MIN_ART_CULT_CAD', 'Correspondant ministériel pour les Archives Départementales','Correspondant ministériel pour les Archives Départementales', 'MIN_ART_CULT', 'MIN_ART_CULT', 'archiver', 'org_111222333_CAD', true); ---('CD06','Conseil départemental des Alpes Maritimes', 'CD06',NULL, NULL, NULL,'org_111222333', false), ---('AD06', 'Archives départementales des Alpes Maritimes','AD06', 'CD06','CD06','controlAuthority', 'org_111222333_Controle', true); -- Organization user position INSERT INTO "organization"."userPosition" ("userAccountId", "orgId", "function", "default") VALUES ('bblier', 'ACME_Archive', 'Archiviste', true), -('superadmin', 'MAARCH_LES_BAINS_SI', '', true), +('superadmin', 'MAARCH_LES_BAINS_DSI', '', true), ('ppreboist', 'MAARCH_LES_BAINS_DGS', '', true), +('bboule', 'MAARCH_LES_BAINS_CC', '', true), +('vvictoire', 'MAARCH_LES_BAINS_CC', '', true), + ('ccox', 'MAARCH_LES_BAINS_SF', '', true), ('aadams', 'MAARCH_LES_BAINS_SF', '', true), -('sstone', 'MAARCH_LES_BAINS_SJA', '', true), -('bbain', 'MAARCH_LES_BAINS_SJA', '', true), - -('cchaplin', 'MAARCH_LES_BAINS_SV', '', true), -('ddaull', 'MAARCH_LES_BAINS_SV', '', true), +('sstone', 'MAARCH_LES_BAINS_SA', '', true), +('cchaplin', 'MAARCH_LES_BAINS_SA', '', true), +('rreynolds', 'MAARCH_LES_BAINS_SA', '', true), + +('bbain', 'MAARCH_LES_BAINS_SJ', '', true), + +('hhier', 'MIN_ART_CULT_CAD', '', true), -('sstallone', 'AD_92_Controle', '', true); +('ddaull', 'AD_92_SHP', '', true), +('sstallone', 'AD_92_AC', '', true); -- Organization service position INSERT INTO "organization"."servicePosition" ("serviceAccountId", "orgId") VALUES ('System', 'ACME_Archive'), -('ServiceVersant', 'MAARCH_LES_BAINS_SV'); +('ServiceVersant', 'MAARCH_LES_BAINS_SA'); -- Organization contacts INSERT INTO "organization"."orgContact" ("contactId", "orgId", "isSelf") VALUES -('ACME', 'ACME_Archive', true), ('Bblier_ACME', 'ACME_Archive', false), -('MAARCH_LES_BAINS_SV', 'MAARCH_LES_BAINS_SV', true), -('MAARCH_LES_BAINS_SF', 'MAARCH_LES_BAINS_SF', true), -('MAARCH_LES_BAINS_SJA', 'MAARCH_LES_BAINS_SJA', true); +('MAARCH_LES_BAINS_SA', 'MAARCH_LES_BAINS_SA', true), +('MAARCH_LES_BAINS_SF', 'MAARCH_LES_BAINS_SF', true); -- GitLab