Interface AccessPathChecker

All Superinterfaces:
Serializable

public interface AccessPathChecker extends Serializable
Checks if a user has access to a given route path.

The path to check is relative to the Vaadin application and does not contain any container specific details such as context or servlet path.

In addition, the path is never null and never starts with a "/" character.

Implementors of this interface are meant to be used in combination with RoutePathAccessChecker.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasAccess(String path, Principal principal, Predicate<String> roleChecker)
    Checks if the user defined by the given Principal and role checker has access to the given path.
  • Method Details

    • hasAccess

      boolean hasAccess(String path, Principal principal, Predicate<String> roleChecker)
      Checks if the user defined by the given Principal and role checker has access to the given path.

      The path is relative to the Vaadin application and does not contain any container specific details such as context or servlet path.

      The path is never null and never starts with a "/" character.

      Parameters:
      path - the path to check access to
      principal - the principal of the user
      roleChecker - a function that can answer if a user has a given role
      Returns:
      true if the user has access to the given path, false otherwise.