teqo/src/utilities/access
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
..
activities.ts feat(C90): remodela responsáveis da Atividade em campo único polimórfico 2026-08-08 17:10:48 -03:00
allocationDecisions.ts Implement C12 campaign foundation records 2026-07-24 19:27:15 -03:00
calendarFeeds.ts fix(C92): calendar feed creation stripped by admin-only system fields 2026-08-08 23:13:30 -03:00
campaignUsers.ts B34+: scale and DRY after municipality chip lists. 2026-07-28 19:49:29 -03:00
contacts.ts feat(campanha): B163 — editar contatos das dobradinhas 2026-08-06 16:52:55 -03:00
demands.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
elections.ts Pass 2 W4b: zero exports mortos; knip exports/types/enumMembers em ERROR no CI 2026-07-25 15:51:52 -03:00
invites.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
leaderships.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
municipalities.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
municipalityUpdates.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
notifications.ts D2 — Push + sino in-app para /campanha 2026-07-31 01:51:41 +00:00
organizations.ts Break up the god modules into deep domain modules 2026-07-23 23:44:45 -03:00
shared.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
stateDeputies.ts B156 — assessores por dobradinha (campo, coluna e seção; RelationOptionCell extraído) 2026-08-04 04:57:15 -03:00
supporters.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
votePledges.ts Engineering Pass 3: consolidate patterns and lock them with guards. 2026-07-29 06:11:29 -03:00
webauthnCredentials.ts Deliver B40: biometric login for /campanha. 2026-07-28 10:59:23 -03:00