Builds a scoped RBAC grant source over a repository: one row per grant, scopeType/scopeId both null for a global grant.
scopeType
scopeId
null
A chain question is ONE query — the subject, and the scope in the chain or global; an all question (sign-in timing) reads every row of the subject.
chain
all
The entity, column names and row limit
A factory AuthPlugin resolves in onInit
onInit
When the entity, a field name or the limit is invalid
AuthPlugin({ rbac: { roles: { approver: { permissions: ['invoices:approve'] } } }, scopedRbac: { sources: [{ kind: 'custom', source: createDatabaseGrantSource({ entity: 'grants' }) }], },}); Copy
AuthPlugin({ rbac: { roles: { approver: { permissions: ['invoices:approve'] } } }, scopedRbac: { sources: [{ kind: 'custom', source: createDatabaseGrantSource({ entity: 'grants' }) }], },});
0.9.0
Builds a scoped RBAC grant source over a repository: one row per grant,
scopeType/scopeIdbothnullfor a global grant.A
chainquestion is ONE query — the subject, and the scope in the chain or global; anallquestion (sign-in timing) reads every row of the subject.