5 Commits
Author SHA1 Message Date
marc 1cf23c37ce fix: is_allowed_nocache resolves roles once per org, not per rule
release / release (push) Canceled after 0s
Steps 1, 2, 4 and 5 called get_comprehensive_roles() for every row of
morbac.rules (and org_in_scope() per row), so a decision cost grew with
every tenant's rules: ~240 ms with 2376 rules across 27 orgs. Roles are now
resolved once per org where the user can hold one and that has a rule for
the request, rules are read through those (org, role) pairs, and
org_in_scope() runs once per (org, scope) pair. Decisions are unchanged.

Release 1.0.1 with the 1.0.0 -> 1.0.1 upgrade script. Test 17 compares
every decision with the 1.0.0 body on a seeded random fixture and checks
the cost no longer follows unrelated tenants' rules. bump_version.sh no
longer rewrites the PGXN meta-spec version.
2026-10-14 23:41:00 +02:00
marc 493c2ec429 refactor: the npm package moves to pgmorbac-node
This repository is the SQL extension only. @crudy/pgmorbac is published from
pgmorbac-node, which packs the SQL of each signed release.
2026-10-03 09:57:08 +02:00
marc cfe370f761 docs: release process covers the npm package
bump_version.sh also bumps package.json, so prepack's version check holds.
2026-10-03 02:19:06 +02:00
marc fca7e2053f feat(rules): add preemptive warning when creating conflicting rules 2026-03-23 00:50:00 +01:00
marc a448a73e37 misc(project): add missing documentation and cleanup 2026-03-22 23:57:49 +01:00