Changelog
Every release of @zynactra/access, newest first.
v2.0.0
Major changes
-
Admin API and screens for day-to-day use (same in the Go module):
- Validation problems carry
field, the request field they are about. GET /assignmentssearches (q) and pages by cursor (limit,cursor,nextCursor).POST /assignments/previewruns the assignment rules without writing and returns what the assignment would grant and require.- Roles include
usage(active assignments and group mappings). GET /changesfilters bykind(a kind or a family),actor,targetandseverity.- The React admin screens use
@zynactra/ui0.3: role editor in a sheet with permission search and select-all, typed confirmation to delete, toasts with undo, field-level errors, a preview-driven assignment form with a date-time picker for the end, server search and Load more, people shown by name, org units picked from a tree, and a filterable change log with a diff per change.AccessAdmintakessearchUsers;PickOptiongainsdescriptionandparentId.
Migration from 1.x:
GET /assignmentsreturns at most 100 items per page (limitup to 500). FollownextCursorto read everything.client.listAssignments()(React) andAdminService.listAssignments()now return{ items, nextCursor? }instead of an array.AdminService.listChanges(actor, limit, beforeId)is nowlistChanges(actor, { limit, beforeId, kind, actorId, targetId, severity }).- Custom
AdminStoreimplementations:listAssignmentsreturns anAssignmentPageand honoursquery,limitandcursor(useencodeCursor/decodeCursor);listChanges(orgId, filter)takes aChangeFilter; roles carryusage.@zynactra/access-drizzledoes all of this. @zynactra/access-react/admin:OptionPickerandMultiOptionPickerare replaced byUserPickerandScopeIdsPicker, andRoleDialogbyRoleEditor(same props). The peer dependency is@zynactra/ui^0.3.0, and the screens confirm changes with toasts, so mount<Toaster>from@zynactra/ui/toastonce.
- Validation problems carry
Minor changes
-
Use more of Cerbos (same in the Go module):
- Org rules.
zaccess.yamltakesorgRules: [./orgs/*.yaml]: per-org rules that deny product permissions when a condition holds, compiled into Cerbos scoped policies that can only narrow. The SDKs send the org as the Cerbos scope for kinds it has rules for. Checks, list plans and Explain all apply them. - Explain says why. Generated rules emit outputs, so Explain reports the scope that allowed a decision (
scope) and finer deny reasons:other_org,scope,condition,org_rule(withorgRule). The admin screen shows them. Clients that only knowpolicycan keep treating unknown reasons aspolicy. - Smaller Cerbos requests. Checks and plans send only the permissions they decide, not the subject's whole access.
- Decision logs. The example
cerbos.yamlturns on Cerbos decision logs (stdout); copy it. - Fix: a negated condition over a nullable column no longer drops rows where the column is NULL. Both SQL translators emit
(...) IS NOT TRUEinstead ofNOT (...), matching the check.
Regenerate with
zaccess gento get the outputs in your policies. - Org rules.
-
Docs for everything, on the Zynactra docs site and in the package:
- The docs now live in
docs/contentand are published with the other Zynactra libraries by zynactra/docs-central: concepts, a guide per stack, list filters, field-level permissions, admin screens, deploying, and reference pages for the manifest, the CLI, the HTTP API, both SDKs, errors and configuration. The design decisions moved there too. @zynactra/accessships them as markdown indocs/(node_modules/@zynactra/access/docs/README.md), and the Claude Code plugin's references are the same pages, so agents read exactly what the site says.- New
@zynactra/access-react/testing:fakeAccessApi, an in-memory access API for tests, demos and docs (pass itsfetchtocreateAccessClient), withadminSummaryandglobalGrant(). - Fix: in the assign dialog, assigning a role to yourself is shown at the person field, not as "You can't grant this" at the role field.
- The docs now live in
v1.0.0
Minor changes
- First release of zynactra/access: manifests and
zaccesscodegen, scoped grants evaluated by Cerbos, plan-to-SQL list filters, the admin service and API with no-escalation rules, the Postgres store with NOTIFY cache invalidation, the NestJS module, React hooks and admin screens, and the Go SDK with the same behaviour (shared conformance fixtures).