rent permissions explain
Usage
rent permissions explain Canvas.editor --as Principal:maya --id launchThe command evaluates a real database resource through Rent's guarded runtime. It returns schema-only decision branches, with independent actor and represented-subject results. The resource must be readable to the viewer. Missing and hidden resources have the same error.
| Option | Meaning |
|---|---|
Model.permission | Positional name of the model and declared rule. |
--id KEY | Resource key: scalar text/number or a complete named JSON object. |
--as Model:KEY | Trusted actor identity. Defaults to anonymous when omitted. |
--tenant KEY | Tenant scope. Inferred from the actor's embedded tenant key when omitted. |
--group Model:KEY | Trusted actor group. Repeat as needed. |
--admin | Set the actor's administrator claim. Tenant isolation still applies. |
--on-behalf-of Model:KEY | Independent represented identity. |
--represented-group Model:KEY | Group for that represented identity. |
--represented-admin | Administrator claim for that represented identity. |
--schema PATH | RSL file or directory. Defaults to the project schema. |
--database-url URL | Override the normal project/environment database configuration. |
--dialect DIALECT | Database dialect. Inferred from the URL when omitted. |
--json | Serialize the public PermissionExplanation result. |
Compound keys
A complete key can look like this:
{"tenant_id":"acme","id":"notes"}Supply compound keys as JSON with every primary-key field:
rent permissions explain Post.viewer \
--as 'User:{"tenant_id":"acme","id":"maya"}' \
--id '{"tenant_id":"acme","id":"notes"}' --jsonQuoted numeric values do not match numeric key fields. Unknown fields, missing components, invalid ranges and tenant mismatches fail before authorization can grant access.
The command reads the existing database. Its viewer flags are trusted local debugging inputs, not an authentication mechanism. The CLI evaluates RSL permissions and tenancy. Application-installed Rust privacy policies require the configured generated client. The CLI cannot instantiate those factories and rejects schemas that declare them. Recursive explanations use the same depth/work limits as ordinary recursive reads and checks. An incomplete evaluation returns an error, not a partial decision tree. See the recursive explanation example.
See the runnable CLI example.
