Class User

    • Constructor Detail

      • User

        public User​(String uid,
                    String roles)
        Construct.
        Parameters:
        uid - the unique user id
        roles - a comma seperated list of roles (e.g. USER,ADMIN)
    • Method Detail

      • hasRole

        public boolean hasRole​(String role)
        Whether this user has the given role.
        Parameters:
        role -
        Returns:
        whether this user has the given role
      • hasAnyRole

        public boolean hasAnyRole​(Roles roles)
        Whether this user has any of the given roles.
        Parameters:
        roles - set of roles
        Returns:
        whether this user has any of the given roles
      • getUid

        public String getUid()
        Gets the uid.
        Returns:
        the uid