Class GrantedAccessController

    • Constructor Detail

      • GrantedAccessController

        public GrantedAccessController()
    • Method Detail

      • isUserAuthorized

        public boolean isUserAuthorized​(Set<SilverpeasRole> userRoles)
        Description copied from interface: AccessController
        Checks user authorization from the given role collection.
        Parameters:
        userRoles - user roles.
        Returns:
        true if user authorization, false otherwise.
      • 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.
        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,
                                        String object,
                                        AccessControlContext context)
        Description copied from interface: AccessController
        Checks if the specified user may access the specified object.
        Parameters:
        userId - the unique identifier of the user.
        object - 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,
                                         String object)
        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.
        Parameters:
        groupId - the unique identifier of a group.
        object - the unique identifier of the object to be accessed.
        Returns:
        true if the group can access the given object, false otherwise.