itemPolicy
fun itemPolicy(currentPolicy: ItemPolicy? = null, buildBlock: ItemPolicyBuilderScope.() -> Unit): ItemPolicy
Builds an ItemPolicy using a DSL builder block.
This function allows building a new ItemPolicy. If a currentPolicy is provided, its settings will be used as a base.
Example:
val policy = itemPolicy {
get(ItemPolicyValues.DEFAULT)
create(...)
...
}
Content copied to clipboard
Return
the resulting ItemPolicy after applying the builder block
Parameters
currentPolicy
optional base policy to build upon; if null
, a new builder is created
buildBlock
the block that defines item-level access rules within ItemPolicyBuilderScope