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.
      • fillUserRoles

        protected void fillUserRoles​(Set<SilverpeasRole> userRoles,
                                     AccessControlContext context,
                                     String userId,
                                     NodePK nodePK)
        Description copied from class: AbstractAccessController
        Fills in the specified set the roles the user plays for the given resource in Silverpeas according to the specified access context.
        Overrides:
        fillUserRoles in class AbstractAccessController<NodePK>
        Parameters:
        userRoles - the set to fill in.
        context - the context defining the type of access with some additional parameters.
        userId - the unique identifier of the user.
        nodePK - the resource in Silverpeas accessed by the user.