Interface AccessEvaluator
- All Known Implementing Classes:
RequiresRole.Evaluator,SecuredAccess.NotSetAccessEvaluator
public interface AccessEvaluator
An
AccessEvaluator is 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
Modifier and TypeMethodDescriptionbooleanhasAccess(AccessContext accessContext) Returns whether access should be granted based on the given context.
-
Method Details
-
hasAccess
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
-