Commit Graph

29 Commits

Author SHA1 Message Date
Bryan Frimin
bca36636f9 Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 14:29:48 -07:00
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Émile Ré
9d4af4d73e Validate cookie policy link in banner description
Translations are no longer part of the version snapshot, so the
banner_description text must be validated at write time to ensure
the {{cookie_policy_link}} placeholder is present. Without it
the cookie policy URL silently disappears from the rendered banner.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-02 19:09:16 +04:00
Émile Ré
165b9ad9d3 Add slug to cookie categories for stable consent identifiers
The category slug provides a stable, URL-safe key used as the
data-cookie-consent attribute value and consent data key, replacing
the fragile category name. This prevents breakage when categories
are renamed.

- Add slug column with unique-per-banner constraint and backfill migration
- Add Slug validator (lowercase alphanumeric + hyphens)
- Propagate slug through GraphQL schema, service layer, and snapshot
- Update console UI with slug field in create/edit forms
- Switch cookie-banner widget to use slug as consent data keys

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:10 +04:00
Émile Ré
abd565c96a Reject origins with trailing empty port in validator
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 10:21:01 +04:00
Émile Ré
8ec434d67e Fix review comments on cookie banner API
Parse only the first IP from X-Forwarded-For to prevent
the full chain from bypassing anonymization. Add secondary
sort key for deterministic consent selection. Reject origins
with empty port suffix in the validator.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 10:21:00 +04:00
Émile Ré
d05c3591d3 Handle cookie banner origin validation + unicity
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 10:20:59 +04:00
Sacha Al Himdani
ab5f42ad74 Redesign document approval flow
Replace the per-approver add/remove model with a quorum-based approval
system. Documents now have default approvers that are pre-populated when
requesting approval, and the publish dialog lets users adjust the list
before submitting.

Key changes:

- Add PENDING_APPROVAL document version status with dedicated transitions
- Introduce approval quorums with request/approve/reject/void lifecycle
- Add default approvers per document (stored in document_default_approvers)
  with MERGE-based upsert for efficient sync
- Add NoDuplicates validator for slice fields
- Split ALTER TYPE ADD VALUE migrations into separate files (required by
  PostgreSQL when run inside transactions)
- Use VOIDED consistently for both quorum status and decision state enums
- Expose void/approve/reject through GraphQL and MCP, with e2e tests
- Add approval management UI: publish dialog with approver selection,
  approval list with void support, and external approve/reject page

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-09 18:18:30 +02:00
Émile Ré
7cd4606278 Validate document content length by extracted text, not JSON size
Add Node.TextLength() to walk the ProseMirror tree and sum actual user
text. Introduce ProseMirrorDocumentMaxTextLength validator that enforces
a 50k character limit on extracted text, paired with a 500k byte safety
cap on the raw JSON string. Extend e2e tests for content length.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-09 14:47:48 +04:00
Émile Ré
821f66cc20 Review fixes
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 19:53:25 +04:00
Émile Ré
f3982f23f9 Sanitize upon saving
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Bryan Frimin
6a77d42dd6 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 00:28:47 +01:00
Bryan Frimin
ef76a8d2e1 Remove deadcode
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:18:02 +01:00
Sacha Al Himdani
d5c62a9383 Run go fmt/fix
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-13 14:48:13 +01:00
Bryan Frimin
d4b3025463 Use go 1.26 syntax
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-06 15:00:42 +01:00
Sacha Al Himdani
06aa781bb2 Allow more permissive bracket validations
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-23 15:24:24 +01:00
Sacha Al Himdani
40e4db9278 Remove deprecated SOA code
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-17 15:06:49 +01:00
Bryan Frimin
ece54f1616 Fix golint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 18:42:50 +01:00
Émile Ré
2f8aef9927 Fix missing return statements
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:01 +01:00
Émile Ré
85e453ebcd Fix cubic review
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
729551beac Fix validator
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
893617ef51 Handle invalid error in the request form
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
64d2ecee59 Add email not blacklisted validator
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
32f90ac310 Fix NotOneOfSlice
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
c0b2a5702d Introduce pkg/mail.Addr
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
cab9d6f2ed WIP
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Antoine Bouchardy
139f5984e2 Add meeting and meeting summary objects
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-12 23:55:49 +01:00
Bryan Frimin
f9216d30b2 Add validator lib
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-06 13:13:17 +01:00