Skip to content
ReferenceCommand line

rent permissions explain

Usage

rent permissions explain Canvas.editor --as Principal:maya --id launch

The 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.

OptionMeaning
Model.permissionPositional name of the model and declared rule.
--id KEYResource key: scalar text/number or a complete named JSON object.
--as Model:KEYTrusted actor identity. Defaults to anonymous when omitted.
--tenant KEYTenant scope. Inferred from the actor's embedded tenant key when omitted.
--group Model:KEYTrusted actor group. Repeat as needed.
--adminSet the actor's administrator claim. Tenant isolation still applies.
--on-behalf-of Model:KEYIndependent represented identity.
--represented-group Model:KEYGroup for that represented identity.
--represented-adminAdministrator claim for that represented identity.
--schema PATHRSL file or directory. Defaults to the project schema.
--database-url URLOverride the normal project/environment database configuration.
--dialect DIALECTDatabase dialect. Inferred from the URL when omitted.
--jsonSerialize 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"}' --json

Quoted 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.

On this page