Files
probo/pkg/coredata
Bryan Frimin b39d880c0f Switch AuthorizationAttributes to batch and add AuthorizeBatch
Change AuthorizationAttributer.AuthorizationAttributes to take a slice
of resource ids and return policy.AttributesByID, so a single SQL
round-trip can load condition attributes for a whole batch. All
coredata implementations are migrated to a single
`WHERE id = ANY(@resource_ids::text[])` query that returns only the
rows it finds.

Authorizer gains:
  - AuthorizeBatch — all-or-nothing across a homogeneous (same entity
    type, same organization) resource set; rejects mixed entity types,
    mixed organizations, and empty batches with structured errors.
  - AuthorizeMulti — heterogeneous evaluation that returns one error
    per item and writes audit log entries in a single bulk insert.

The single-resource Authorize is rewired to delegate to AuthorizeBatch
so all paths share the same condition evaluation and audit logging.
recordAuditLog is split into buildAuditLogEntry plus a batch insert.

Tests cover the new batch and multi paths, mixed/empty/unsupported
resource cases, audit log batching, and dry-run behaviour.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-23 13:31:36 -07:00
..
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-04-13 14:50:42 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-19 21:44:27 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-04-03 11:56:06 +02:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00