feat(accounts): add consent settings and organization management

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 13:00:39 +03:00
1 parent 24638d46d2
commit 391af7a1ef
83 files changed
+10198 -613

No files matched your search

@@ -22,11 +22,12 @@ import (
// never by text. The duplicate grants of the ledger are no errors: the
// inserts use ON CONFLICT DO NOTHING.
var consentConstraintErrors = map[constraintViolation]error{
{foreignKeyViolationCode, "consent_records_subject_id_fkey"}: outbound.ErrUserNotFound,
{foreignKeyViolationCode, "consent_records_text_fkey"}: outbound.ErrConsentTextNotFound,
{foreignKeyViolationCode, "consent_records_published_text_fkey"}: outbound.ErrConsentTextMismatch,
{checkViolationCode, "consent_records_text_published"}: outbound.ErrConsentTextNotPublished,
{checkViolationCode, "consent_records_c4_text_hash"}: outbound.ErrConsentTextMismatch,
{foreignKeyViolationCode, "account_deletion_requests_subject_id_fkey"}: outbound.ErrUserNotFound,
{foreignKeyViolationCode, "consent_records_subject_id_fkey"}: outbound.ErrUserNotFound,
{foreignKeyViolationCode, "consent_records_text_fkey"}: outbound.ErrConsentTextNotFound,
{foreignKeyViolationCode, "consent_records_published_text_fkey"}: outbound.ErrConsentTextMismatch,
{checkViolationCode, "consent_records_text_published"}: outbound.ErrConsentTextNotPublished,
{checkViolationCode, "consent_records_c4_text_hash"}: outbound.ErrConsentTextMismatch,
// The revoke queries clamp the time to the grant, so this stays a
// backstop for a revocation written around them.
{checkViolationCode, "consent_records_revocation_stamp"}: domain.ErrInvalidConsent,