Class RemoteUserProvider


  • public class RemoteUserProvider
    extends Object
    Provides information around the currently logged in user.
    • Method Detail

      • setUserId

        public static void setUserId​(String userId)
        Set the user's unique OID
        Parameters:
        userId - the user's unique OID
      • getUserId

        public static String getUserId()
        Return the user's unique OID
        Returns:
        the user's unique OID
      • setClientRestrictionMode

        public static void setClientRestrictionMode​(boolean isClientRestrictedMode)
        Sets the client restricted mode. Note this is only set by the RemoteUserFilter in Manager.
        Parameters:
        isClientRestrictedMode - the new global access
        Since:
        20.5.0
      • getClientRestrictionMode

        public static boolean getClientRestrictionMode()
        Gets the client restricted mode. Note this is only set by the RemoteUserFilter in Manager.
        Returns:
        the client restricted mode
        Since:
        20.5.0
      • setGlobalAccess

        public static void setGlobalAccess​(boolean hasGlobalAccess)
        Sets the global access.
        Parameters:
        hasGlobalAccess - the new global access
      • getGlobalAccess

        public static boolean getGlobalAccess()
        Gets the global access.
        Returns:
        the global access
      • setClientIdSet

        public static void setClientIdSet​(Set<Long> set)
        Sets the client id set.
        Parameters:
        set - the new client id set
        Since:
        4.0.0
      • getClientIdSet

        public static Set<Long> getClientIdSet()
        Gets the client id set.
        Returns:
        the client id set
        Since:
        4.0.0
      • setPermissionSet

        public static void setPermissionSet​(Set<String> set)
        Set the names of all permissions associated with the user and the portal the user is logged on to
        Parameters:
        set - a set containing the permission names
      • getPermissionSet

        public static Set<String> getPermissionSet()
        Return the names of all permissions associated with the user and the portal the user is logged on to
        Returns:
        the set of permission names, or an empty set if no permissions were set
      • setRemoteUser

        public static void setRemoteUser​(Object object)
        Set the login name of the remote user
        Parameters:
        object - a UserAccount object or String describing the remote user
      • getRemoteUser

        public static String getRemoteUser()
        Return the user name (generally login name) of the remote user
        Returns:
        the user name
      • clear

        public static void clear()
        Clear the thread local objects.
      • hasAccessClient

        public static boolean hasAccessClient​(Long clientId)
        Checks if the RemoteUser is in Manager (clientRestrictionMode is true) has access to the client that is is a Global Admin or has access to the client.
        Parameters:
        clientId - the Long id of the client to check
        Returns:
        true if the RemoteUser is in Manager (clientRestrictionMode is true) has access to the client that is is a Global Admin or has access to the client.
        Since:
        20.5.0