Class DefaultAccessCheckDecisionResolver

java.lang.Object
com.vaadin.flow.server.auth.DefaultAccessCheckDecisionResolver
All Implemented Interfaces:
AccessCheckDecisionResolver, Serializable

public class DefaultAccessCheckDecisionResolver extends Object implements AccessCheckDecisionResolver
Default implementation of AccessCheckDecisionResolver that allow access only if input results are all ALLOW, or a combination of ALLOW and NEUTRAL. In any other case the access is DENIED.

 | Results         | Decision |
 | --------------- | -------- |
 | All ALLOW       | ALLOW    |
 | ALLOW + NEUTRAL | ALLOW    |
 | All DENY        | DENY     |
 | DENY + NEUTRAL  | DENY     |
 | ALL NEUTRAL     | DENY     |
 | ALLOW + DENY    | REJECT   |
 

Almost the same rule applies also if the evaluation happens during error handling phase (NavigationContext.isErrorHandling() is true), with a single exception: in this case, if all the results are NEUTRAL the access is granted because the target of the navigation is supposed to be an error handler component and not a view with sensible information.

It should be noted that the above situation never occurs if the AnnotatedViewAccessChecker is enabled because it computes only ALLOW or DENY results.
See Also: