teqo-backup/src/collections
Francisco Solla 29ed733190 fix(C92): calendar feed creation stripped by admin-only system fields
createCalendarFeedLinkRecord failed with `overrideAccess:false` +
`user: campaignUser` because Payload stripped the required
`secretSlug`/`createdBy` fields (create access was admin-only) -> 400
behind the generic message; revokeCalendarFeedRecord silently no-opped
(revokedAt update access also admin-only).

- canCreateCalendarFeed now enforces advisor filterMunicipality scope
  on data (canCreateSupporter precedent) + canSetCalendarFeedSecret /
  canSetCalendarFeedRevocation permit staff to mint the secret on create
  and mark a feed revoked; secret read stays `() => false` and update
  admin-only.
- CalendarFeed stamps createdBy via stampCampaignCreatedBy; secret
  create + revokedAt update use the new staff field accesses.
- Action refactored to `*Record` (payload, actor) cores + thin wrappers;
  assertFilterMunicipalityInScope (tour precedent); console.error keeps
  the real error on the server while the friendly message stays.
- 10 int tests for create/scope/revoke/leader/secret; fixture tracks
  calendarFeed cleanup.

Closes #436
2026-08-08 23:13:30 -03:00
..
Activity.ts feat(C90): remodela responsáveis da Atividade em campo único polimórfico 2026-08-08 17:10:48 -03:00
AllocationDecision.ts B134 — allow empty rationale on movimento allocation decisions 2026-08-02 23:08:52 +00:00
CalendarFeed.ts fix(C92): calendar feed creation stripped by admin-only system fields 2026-08-08 23:13:30 -03:00
CampaignDemand.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
CampaignInvite.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
CampaignUser.ts D2 — Push + sino in-app para /campanha 2026-07-31 01:51:41 +00:00
CampaignVoteSummarySnapshot.ts B57 — delta 7 dias do total estimado no Início 2026-08-01 06:33:39 +00:00
CampaignWebAuthnCredential.ts Deliver B40: biometric login for /campanha. 2026-07-28 10:59:23 -03:00
Consent.ts Lock down CMS/PII collection access and leader routes 2026-07-23 22:25:18 -03:00
Contact.ts feat(campanha): B163 — editar contatos das dobradinhas 2026-08-06 16:52:55 -03:00
ElectionCandidate.ts Add TSE 2022 election results model and local seed import. 2026-07-18 18:25:19 -03:00
ElectionCandidateVote.ts Add TSE 2022 election results model and local seed import. 2026-07-18 18:25:19 -03:00
ElectionTally.ts Add TSE 2022 election results model and local seed import. 2026-07-18 18:25:19 -03:00
Leadership.ts B69: simplify the leadership model to exclusive + drop sector/consentNote. 2026-07-30 02:32:56 -03:00
Media.ts Add users.roles so Payload /admin can separate editors from admins. 2026-07-27 01:54:29 -03:00
Municipality.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
MunicipalityUpdate.ts feat(campaign): C87 — atualização unificada (texto + polaridade + urgente) 2026-08-07 05:04:41 -03:00
Notification.ts D2 — Push + sino in-app para /campanha 2026-07-31 01:51:41 +00:00
Organization.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
Petition.ts Lock down CMS/PII collection access and leader routes 2026-07-23 22:25:18 -03:00
Post.ts Add users.roles so Payload /admin can separate editors from admins. 2026-07-27 01:54:29 -03:00
PushSubscription.ts D2 — Push + sino in-app para /campanha 2026-07-31 01:51:41 +00:00
Signature.ts Lock down CMS/PII collection access and leader routes 2026-07-23 22:25:18 -03:00
StateDeputy.ts feat(campanha): B163 — editar contatos das dobradinhas 2026-08-06 16:52:55 -03:00
Subscription.ts Lock down CMS/PII collection access and leader routes 2026-07-23 22:25:18 -03:00
Supporter.ts D2 — Push + sino in-app para /campanha 2026-07-31 01:51:41 +00:00
SupporterImportBatch.ts Simplify C6 supporter paths and register C8 scale/DRY follow-ups. 2026-07-18 22:34:55 -03:00
Tag.ts Add users.roles so Payload /admin can separate editors from admins. 2026-07-27 01:54:29 -03:00
Users.ts Add users.roles so Payload /admin can separate editors from admins. 2026-07-27 01:54:29 -03:00
VotePledge.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00