Interface: IInMemoryUsageAdapterConfig
Defined in: adapters/in-memory/InMemoryUsageAdapter.ts:13
Configuration of the InMemoryUsageAdapter.
Only tests and the sandbox construct it; the one option scripts the denials.
Properties
deny?
optionaldeny?: (call) =>boolean|IUsageCheckResult
Defined in: adapters/in-memory/InMemoryUsageAdapter.ts:23
Decides a check: true or a result with approved: false denies, anything else approves.
Scripts the app's "no" in a test: deny a user, a kind, a model, the second call.
Parameters
call
Returns
boolean | IUsageCheckResult
Example
({userId}) => userId === "user-b" - user B is out, everyone else is in
Default
every check is approved