Interface AccessEvaluator
-
- All Known Implementing Classes:
RequiresRole.Evaluator,SecuredAccess.NotSetAccessEvaluator
public interface AccessEvaluatorAnAccessEvaluatoris the programmatic, more flexible alternative to expression-based access control for routes and endpoints.Depending on the context, access evaluators are instantiated in different ways:
- Where a
UIis available (which is the case for routes),Instantiator.getOrCreate(Class)will be used. I.e. the evaluator either needs to be available as a Spring bean or it requires a public no-args constructor. - Otherwise (for endpoints) the evaluator is directly requested from the
ApplicationContextand therefore needs to be available as a Spring bean.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasAccess(AccessContext accessContext)Returns whether access should be granted based on the given context.
-
-
-
Method Detail
-
hasAccess
boolean hasAccess(AccessContext accessContext)
Returns whether access should be granted based on the given context.VaadinSecuritycan be used in implementations.- Parameters:
accessContext- the access context- Returns:
- whether access should be granted
-
-