Interface ContentPermissionManagerInternal

    • Method Detail

      • hasContentLevelPermission

        Map<Long,​ValidationResult> hasContentLevelPermission​(ConfluenceUser user,
                                                                   String permissionType,
                                                                   Collection<Long> contentIds)
        Check permission for a collection of content at once.
        • if contentIds belong to same page hierarchy then it will base on the permission set of that hierarchy to check permisssion for all hierarchy => Best performance
        • if contentIds does not belong to same page hierarchy then it will load page list (at once) and call permission check for each page => better performance
        Parameters:
        user -
        permissionType - string needs to be one of the permission constants in ContentPermission
        contentIds -
        Returns:
        a map of validation result
        Since:
        6.0
      • getPermittedPagesIgnoreInheritedPermissions

        @Transactional(readOnly=true)
        List<Page> getPermittedPagesIgnoreInheritedPermissions​(List<Page> contentList,
                                                               ConfluenceUser user,
                                                               String permission)
        Check permissions for a collection of objects without checking permissions of ancestors and spaces.
        Parameters:
        contentList -
        user -
        permission -
        Returns:
        a list of permitted objects
        Since:
        6.12.1
      • hasVisibleChildren

        boolean hasVisibleChildren​(Page page,
                                   ConfluenceUser user)
        Returns true if at least one child is visible This method does not check all children, it stops working when the first visible children is found
        Parameters:
        page -
        user -
        Returns:
        false if 0 children visible, true of at least one child is visible
        Since:
        6.12.1