feat: add option to skip rbac - #1879
Conversation
1 new issue
|
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (4)
🛟 Help
|
|
The option's JSDoc ("The route's own browse/read/export check on the collection being queried is unaffected") doesn't quite cover this either — the surviving check here is on the related collection, not the one being queried. Intentional (mirroring the pre-#1840 behavior for this one shape) or worth gating too? |
|
A couple more things from a review pass:
Minor: no |
# @forestadmin/agent [1.99.0](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/agent@1.98.9...@forestadmin/agent@1.99.0) (2026-09-07) ### Features * add option to skip rbac ([#1879](#1879)) ([9b51ebc](9b51ebc))

Definition of Done
General
Security
Note
Add
skipRelationReadPermissionsoption to bypass relation-path read checks inAuthorizationServiceskipRelationReadPermissionsboolean toAgentOptions(defaultfalse). Whentrue, the agent skips read-permission checks on fields reached through relation paths — projections, filters, sorts, searches, and chart groupings — while authorization on the queried collection still runs.AuthorizationServicegains the constructor parameter and early-returns inredactProjection,assertCanReadQueryFields, andassertCanReadUsageswhen the option is enabled. The chart route in chart.ts also skips browse-permission checks on the counted collection for Count leaderboards.checksRelationReadPermissions(the inverse of the option) so internal consumers know whether relation-path checks are active.OptionsValidator.withDefaultslogs a warning at startup when the option is enabled.skipRelationReadPermissionsmeans clients can read, filter, sort, and search through relations they lack browse/read permission on. Root collection authorization (list, get-one, export) is unaffected and still enforced.Macroscope summarized e3684fd.