Class NodeAccessController

    • Method Detail

      • isUserAuthorized

        public boolean isUserAuthorized​(String userId,
                                        ResourceIdentifier id)
        Description copied from interface: AccessController
        Checks if the specified user may access the object with the specified identifier.
        Specified by:
        isUserAuthorized in interface AccessController<NodePK>
        Parameters:
        userId - the unique identifier of the user.
        id - the unique identifier of the object to be accessed in Silverpeas.
        Returns:
        true if access is granted - false otherwise.
      • isUserAuthorized

        public boolean isUserAuthorized​(String userId,
                                        NodePK nodePK,
                                        AccessControlContext context)
        Description copied from interface: AccessController
        Checks if the specified user may access the specified object.
        Specified by:
        isUserAuthorized in interface AccessController<NodePK>
        Parameters:
        userId - the unique identifier of the user.
        nodePK - the object to be accessed.
        context - the context in which the object is accessed.
        Returns:
        true if access is granted - false otherwise.
      • isGroupAuthorized

        public boolean isGroupAuthorized​(String groupId,
                                         NodePK nodePK)
        Description copied from interface: AccessController
        Is the specified group authorized to access the given object with at least read privileges? The roles of the group on the object aren't taken into account. The group should have at least the user role to access the object unless the object is public.
        Specified by:
        isGroupAuthorized in interface AccessController<NodePK>
        Parameters:
        groupId - the unique identifier of a group.
        nodePK - the unique identifier of the object to be accessed.
        Returns:
        true if the group can access the given object, false otherwise.