Interface User


  • @ProviderType
    public interface User
    Representation of a user. The user object can be used by plugins to authorize(String) the user.
    Since:
    3.4.0
    • Field Detail

      • USER_ATTRIBUTE

        static final String USER_ATTRIBUTE
        The name of the request attribute providing an object of this class
    • Method Detail

      • getUserObject

        Object getUserObject()
        Return the user object. This method might return null if no web console security provider is configured and access to the console is allowed without authentication. This is the same value as the request attribute from WebConsoleSecurityProvider2.USER_ATTRIBUTE.
        Returns:
        The user object or null
      • authorize

        boolean authorize​(String role)
        Checks whether the user has the given role permission.
        Parameters:
        role - The requested role
        Returns:
        true if the user is given permission for the given role.