AccessPolicySpec

The aggregate an access policy is checked on, and the callers it is checked for (accessPolicySpec).

Functions

Link copied to clipboard
fun given(vararg events: Any, scope: Scope = Scope.NONE)

The aggregate after events, one commit each, in scope.

Link copied to clipboard
fun givenState(state: S, scope: Scope = Scope.NONE)

The aggregate in state and scope.

Link copied to clipboard
fun whenCaller(caller: Caller, block: AccessExpectations.() -> Unit)

Checks what caller may do with the aggregate.

fun whenCaller(subject: String? = null, claims: Map<String, List<String>> = emptyMap(), roles: List<String> = emptyList(), block: AccessExpectations.() -> Unit)

Checks what a caller subject may do, holding claims, with roles (its roles claim).