Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(identite): extraxt getOrganizationInfo usecase #899

Draft
wants to merge 6 commits into
base: alpha
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/smooth-waves-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gouvfr-lasuite/proconnect.core": minor
---

👮 Accueillons l'équipe de sécurité de ProConnect

Dans le cadres la migration du script d'import de comptes coop, une partie des fonctions de validation sont déplacées dans le package `@gouvfr-lasuite/proconnect.core/security` pour permettre leur réutilisation dans Hyyypertool.
1 change: 1 addition & 0 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
cache: "npm"
node-version-file: package.json
- run: npm ci --include=dev
- run: npm run build:workspaces
- run: npm run migrate up
- run: npm run fixtures:load-ci -- cypress/e2e/${{ matrix.e2e_test }}/fixtures.sql
- run: npm run update-organization-info -- 500
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
cache: "npm"
node-version-file: package.json
- run: npm ci --omit=dev # omit dev dependencies to simulate deployed environment
- run: npm run build:workspaces
- run: npm run migrate up
- run: npm run fixtures:load-ci -- scripts/fixtures.sql
- run: npm run update-organization-info -- 500
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ WORKDIR /app
FROM base AS prod-deps
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev

FROM base AS build
ENV CYPRESS_INSTALL_BINARY=0
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
--mount=type=cache,target=/root/.npm \
npm ci
COPY tsconfig.json vite.config.mjs ./
Expand Down
8 changes: 4 additions & 4 deletions migrations/1545154190802_create-users-table.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports.shorthands = undefined;

exports.up = async (pgm) => {
await pgm.db.query(`
await pgm.db.query(`
CREATE TABLE users (
id serial NOT NULL,
email character varying DEFAULT ''::character varying NOT NULL,
Expand All @@ -21,16 +21,16 @@ CREATE TABLE users (
type character varying
);`);

await pgm.db.query(`
await pgm.db.query(`
ALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
`);

await pgm.db.query(`
CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email);
CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email);
`);

await pgm.db.query(`
await pgm.db.query(`
CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token);
`);

Expand Down
2 changes: 2 additions & 0 deletions migrations/1623752868625_add-moderation-table.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ exports.shorthands = undefined;
exports.up = async (pgm) => {
await pgm.db.query(`
CREATE TYPE moderation_type AS ENUM('organization_join_block');
`);
await pgm.db.query(`
CREATE TABLE moderations (
id serial,
user_id int NOT NULL,
Expand Down
2 changes: 2 additions & 0 deletions migrations/1633705667117_add-new-moderation-type.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports.up = async (pgm) => {
await pgm.db.query(`
ALTER TABLE moderations
ALTER COLUMN type TYPE character varying;
`);
await pgm.db.query(`
DROP TYPE moderation_type;
`);
};
Expand Down
3 changes: 3 additions & 0 deletions migrations/1702600151114_add-webauthn.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ exports.up = async (pgm) => {
REFERENCES users (id)
ON DELETE CASCADE
);
`);

await pgm.db.query(`
CREATE UNIQUE INDEX index_authenticators_on_credential_id ON authenticators USING btree (credential_id);
`);

Expand Down
Loading
Loading