Interface PermissionResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An external source of permission decisions, such as a permission plugin, consulted before the defaults.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether results from this resolver may be cached by the holder until the next invalidation.resolve(PermissionHolder holder, PermissionNode node) Resolves a node for a holder.default intweight()Ordering weight; higher weights are consulted first.
-
Method Details
-
resolve
Resolves a node for a holder.- Parameters:
holder- the holdernode- the node- Returns:
- the decided state, or
TriState.NOT_SETto defer to the next resolver
-
weight
default int weight()Ordering weight; higher weights are consulted first. Defaults to0.- Returns:
- the weight
-
cacheable
default boolean cacheable()Whether results from this resolver may be cached by the holder until the next invalidation. Returnfalsefor back-ends whose answers can change without going throughPermissionHolder.invalidatePermissions().- Returns:
trueif results are cacheable
-