-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #564 from numerique-gouv/refactor-moderations
Refactor moderations
- Loading branch information
Showing
34 changed files
with
945 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,16 @@ VALUES | |
(2, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'Membre', '0123456789', 'Sbire'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, trackdechets_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
(1, '13002526500013', '{"fake.gouv.fr"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(1, '13002526500013', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO email_domains | ||
(id, organization_id, domain, verification_type, verified_at) | ||
VALUES | ||
(1, 1, 'fake.gouv.fr', 'trackdechets_postal_mail', CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, has_been_greeted) | ||
VALUES | ||
(2, 1, false, 'verified_email_domain', 'is_the_only_active_member', true); | ||
(2, 1, false, 'domain', 'is_the_only_active_member', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,19 @@ VALUES | |
(1, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'Nouveau', '0123456789', 'Sbire'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, trackdechets_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
(1, '66204244933106', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(2, '66204244914742', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(3, '66204244905476', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
-- (4, '66204244923982', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (5, '66204244917307', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (6, '66204244908819', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (7, '66204244908579', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(1, '66204244933106', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(2, '66204244914742', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(3, '66204244905476', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
-- (4, '66204244923982', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (5, '66204244917307', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (6, '66204244908819', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- (7, '66204244908579', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO email_domains | ||
(id, organization_id, domain, verification_type, verified_at) | ||
VALUES | ||
(1, 1, 'mailslurp.com', 'trackdechets_postal_mail', CURRENT_TIMESTAMP), | ||
(2, 2, 'mailslurp.com', 'trackdechets_postal_mail', CURRENT_TIMESTAMP), | ||
(3, 3, 'mailslurp.com', 'trackdechets_postal_mail', CURRENT_TIMESTAMP); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,29 @@ VALUES | |
(8, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'NotAuthenticated1', '0123456789', 'Sbire'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, verified_email_domains, authorized_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
-- COMMUNE DE CLAMART - Mairie | ||
(1, '21920023500014', '{"mailslurp.com"}', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(1, '21920023500014', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
-- COMMUNE DE CLAMART - Service assainissement | ||
(2, '21920023500394', '{"mailslurp.com"}', '{"mailslurp.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(3, '45334017600024', '{"randomain.fr"}', '{"randomain.fr"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(2, '21920023500394', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), | ||
(3, '45334017600024', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO email_domains | ||
(organization_id, domain, verification_type, verified_at) | ||
VALUES | ||
(1, 'mailslurp.com', 'verified', CURRENT_TIMESTAMP), | ||
(2, 'mailslurp.com', 'verified', CURRENT_TIMESTAMP), | ||
(3, 'randomain.fr', 'verified', CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, has_been_greeted) | ||
VALUES | ||
(2, 1, false, 'verified_email_domain', 'all_members_notified', true), | ||
(7, 1, true, 'verified_email_domain', 'all_members_notified', true), | ||
(8, 1, false, 'verified_email_domain', null, false), | ||
(2, 2, false, 'verified_email_domain', 'all_members_notified', true), | ||
(3, 1, false, 'verified_email_domain', 'all_members_notified', true), | ||
(4, 1, false, 'verified_email_domain', 'all_members_notified', true), | ||
(5, 1, false, 'verified_email_domain', 'all_members_notified', true), | ||
(6, 1, false, 'verified_email_domain', 'all_members_notified', true); | ||
(2, 1, false, 'domain', 'all_members_notified', true), | ||
(7, 1, true, 'domain', 'all_members_notified', true), | ||
(8, 1, false, 'domain', null, false), | ||
(2, 2, false, 'domain', 'all_members_notified', true), | ||
(3, 1, false, 'domain', 'all_members_notified', true), | ||
(4, 1, false, 'domain', 'all_members_notified', true), | ||
(5, 1, false, 'domain', 'all_members_notified', true), | ||
(6, 1, false, 'domain', 'all_members_notified', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,66 +62,73 @@ VALUES | |
(57, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'FakeDomain', '0123456789', 'Sbire'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, verified_email_domains, authorized_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
-- DIRECTION INTERMINISTERIELLE DU NUMERIQUE (DINUM) | ||
(1, '13002526500013', '{"mailslurp.com","mailslurp.biz"}', '{"mailslurp.com","fakedomain.com"}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(1, '13002526500013', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO email_domains | ||
(id, organization_id, domain, verification_type, verified_at) | ||
VALUES | ||
(1, 1, 'mailslurp.com', 'verified', CURRENT_TIMESTAMP), | ||
(2, 1, 'mailslurp.biz', 'verified', CURRENT_TIMESTAMP), | ||
(3, 1, 'fakedomain.com', null, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, needs_official_contact_email_verification, has_been_greeted) | ||
VALUES | ||
(2, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(3, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(4, 1, true, 'verified_email_domain', 'all_members_notified', false, true), | ||
(5, 1, false, 'verified_email_domain', null, false, false), | ||
(2, 1, false, 'domain', 'all_members_notified', false, true), | ||
(3, 1, false, 'domain', 'all_members_notified', false, true), | ||
(4, 1, true, 'domain', 'all_members_notified', false, true), | ||
(5, 1, false, 'domain', null, false, false), | ||
(6, 1, false, null, null, true, false), | ||
(7, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(8, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(9, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(10, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(11, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(12, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(13, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(14, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(15, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(16, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(17, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(18, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(19, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(20, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(21, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(22, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(23, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(24, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(25, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(26, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(27, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(28, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(29, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(30, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(31, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(32, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(33, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(34, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(35, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(36, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(37, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(38, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(39, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(40, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(41, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(42, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(43, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(44, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(45, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(46, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(47, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(48, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(49, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(50, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(51, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(52, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(53, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(54, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(55, 1, false, 'verified_email_domain', 'all_members_notified', false, true), | ||
(56, 1, false, 'verified_email_domain', 'all_members_notified', false, true); | ||
(7, 1, false, 'domain', 'all_members_notified', false, true), | ||
(8, 1, false, 'domain', 'all_members_notified', false, true), | ||
(9, 1, false, 'domain', 'all_members_notified', false, true), | ||
(10, 1, false, 'domain', 'all_members_notified', false, true), | ||
(11, 1, false, 'domain', 'all_members_notified', false, true), | ||
(12, 1, false, 'domain', 'all_members_notified', false, true), | ||
(13, 1, false, 'domain', 'all_members_notified', false, true), | ||
(14, 1, false, 'domain', 'all_members_notified', false, true), | ||
(15, 1, false, 'domain', 'all_members_notified', false, true), | ||
(16, 1, false, 'domain', 'all_members_notified', false, true), | ||
(17, 1, false, 'domain', 'all_members_notified', false, true), | ||
(18, 1, false, 'domain', 'all_members_notified', false, true), | ||
(19, 1, false, 'domain', 'all_members_notified', false, true), | ||
(20, 1, false, 'domain', 'all_members_notified', false, true), | ||
(21, 1, false, 'domain', 'all_members_notified', false, true), | ||
(22, 1, false, 'domain', 'all_members_notified', false, true), | ||
(23, 1, false, 'domain', 'all_members_notified', false, true), | ||
(24, 1, false, 'domain', 'all_members_notified', false, true), | ||
(25, 1, false, 'domain', 'all_members_notified', false, true), | ||
(26, 1, false, 'domain', 'all_members_notified', false, true), | ||
(27, 1, false, 'domain', 'all_members_notified', false, true), | ||
(28, 1, false, 'domain', 'all_members_notified', false, true), | ||
(29, 1, false, 'domain', 'all_members_notified', false, true), | ||
(30, 1, false, 'domain', 'all_members_notified', false, true), | ||
(31, 1, false, 'domain', 'all_members_notified', false, true), | ||
(32, 1, false, 'domain', 'all_members_notified', false, true), | ||
(33, 1, false, 'domain', 'all_members_notified', false, true), | ||
(34, 1, false, 'domain', 'all_members_notified', false, true), | ||
(35, 1, false, 'domain', 'all_members_notified', false, true), | ||
(36, 1, false, 'domain', 'all_members_notified', false, true), | ||
(37, 1, false, 'domain', 'all_members_notified', false, true), | ||
(38, 1, false, 'domain', 'all_members_notified', false, true), | ||
(39, 1, false, 'domain', 'all_members_notified', false, true), | ||
(40, 1, false, 'domain', 'all_members_notified', false, true), | ||
(41, 1, false, 'domain', 'all_members_notified', false, true), | ||
(42, 1, false, 'domain', 'all_members_notified', false, true), | ||
(43, 1, false, 'domain', 'all_members_notified', false, true), | ||
(44, 1, false, 'domain', 'all_members_notified', false, true), | ||
(45, 1, false, 'domain', 'all_members_notified', false, true), | ||
(46, 1, false, 'domain', 'all_members_notified', false, true), | ||
(47, 1, false, 'domain', 'all_members_notified', false, true), | ||
(48, 1, false, 'domain', 'all_members_notified', false, true), | ||
(49, 1, false, 'domain', 'all_members_notified', false, true), | ||
(50, 1, false, 'domain', 'all_members_notified', false, true), | ||
(51, 1, false, 'domain', 'all_members_notified', false, true), | ||
(52, 1, false, 'domain', 'all_members_notified', false, true), | ||
(53, 1, false, 'domain', 'all_members_notified', false, true), | ||
(54, 1, false, 'domain', 'all_members_notified', false, true), | ||
(55, 1, false, 'domain', 'all_members_notified', false, true), | ||
(56, 1, false, 'domain', 'all_members_notified', false, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ VALUES | |
(1, '[email protected]', true, CURRENT_TIMESTAMP, 'forgotten_password', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'User', '0123456789', 'Sbire'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, verified_email_domains, authorized_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
(1, '21340126800130', '{}', '{}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(1, '21340126800130', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, has_been_greeted) | ||
VALUES | ||
(1, 1, false, 'verified_email_domain', 'all_members_notified', true); | ||
(1, 1, false, 'domain', 'all_members_notified', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ VALUES | |
(1, '[email protected]', false, null, null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Jean', 'Jean', null, null, true, true); | ||
|
||
INSERT INTO organizations | ||
(id, siret, verified_email_domains, authorized_email_domains, created_at, updated_at) | ||
(id, siret, created_at, updated_at) | ||
VALUES | ||
(1, '21340126800130', '{}', '{}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
(1, '21340126800130', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, has_been_greeted) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.