Class DenormalisedPermissionFallbackServiceImpl
java.lang.Object
com.atlassian.confluence.security.denormalisedpermissions.impl.DenormalisedPermissionFallbackServiceImpl
- All Implemented Interfaces:
- BulkPermissionService
public class DenormalisedPermissionFallbackServiceImpl
extends Object
implements BulkPermissionService
Provides fallback methods for denormalised permissions
 When denormalised permission service is in "not ready" state,
 fallback methods will be called.
- Since:
- 7.11.0
- 
Constructor SummaryConstructorsConstructorDescriptionDenormalisedPermissionFallbackServiceImpl(SpaceManagerInternal spaceManager, SpaceDaoInternal spaceDaoInternal, SpacePermissionsFilterDao spacePermissionsFilterDao, SpacePermissionQueryManager spacePermissionQueryManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionManagerInternal contentPermissionManager, PageManagerInternal pageManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionManager spacePermissionManager, RegularEntitiesAndPermissionsHelper regularEntitiesAndPermissionsHelper, ServiceAccountPermissionManager serviceAccountPermissionManager) 
- 
Method SummaryModifier and TypeMethodDescriptiongetAllSpaceKeysWithPermissionStatuses(ConfluenceUser confluenceUser, String spacePermissionType) Returns a map of spaces where key is space key, and value is flag (true if permitted, false is not)getAllVisiblePagesInSpace(@Nullable ConfluenceUser confluenceUser, long spaceId) Returns the full list of visible pages in the space.getPermittedSpaceIds(@Nullable ConfluenceUser confluenceUser, Set<Long> spaceIds, String spacePermissionType) Returns a set of permitted space ids.getPermittedSpaces(SpacesQuery spaceQuery, int offset, int limit) Returns a list of permitted spaces filters by spaceQuery.getVisibleChildPages(@Nullable ConfluenceUser confluenceUser, Set<Long> parentPageIdSet, boolean checkInheritedPermissions) Receives a set of page ids as a parameter and finds all visible children for them.getVisiblePageIds(@Nullable ConfluenceUser confluenceUser, Set<Long> pageIds, boolean checkSpacePermissions) Returns a set of visible page ids.getVisibleTopLevelPages(@Nullable ConfluenceUser confluenceUser, long spaceId) Finds all visible top-level pages.
- 
Constructor Details- 
DenormalisedPermissionFallbackServiceImplpublic DenormalisedPermissionFallbackServiceImpl(SpaceManagerInternal spaceManager, SpaceDaoInternal spaceDaoInternal, SpacePermissionsFilterDao spacePermissionsFilterDao, SpacePermissionQueryManager spacePermissionQueryManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionManagerInternal contentPermissionManager, PageManagerInternal pageManager, PermissionManager permissionManager, PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionManager spacePermissionManager, RegularEntitiesAndPermissionsHelper regularEntitiesAndPermissionsHelper, ServiceAccountPermissionManager serviceAccountPermissionManager) 
 
- 
- 
Method Details- 
getAllSpaceKeysWithPermissionStatusespublic Map<String,Boolean> getAllSpaceKeysWithPermissionStatuses(ConfluenceUser confluenceUser, String spacePermissionType) Returns a map of spaces where key is space key, and value is flag (true if permitted, false is not)- Specified by:
- getAllSpaceKeysWithPermissionStatusesin interface- BulkPermissionService
- Parameters:
- confluenceUser- confluence user.
- spacePermissionType- - permission type. Only "VIEWSPACE" or "EDITSPACE" are supported
- Returns:
- map of spaces with their permission statuses
- Since:
- 7.11.0
 
- 
getPermittedSpacesReturns a list of permitted spaces filters by spaceQuery.- Specified by:
- getPermittedSpacesin interface- BulkPermissionService
- Parameters:
- spaceQuery- query
- offset- offset for the query
- limit- maxResults for the query. Must be greater than 0
- Returns:
- list of permitted filtered spaces
- Since:
- 7.11.0
 
- 
getPermittedSpaceIdspublic Set<Long> getPermittedSpaceIds(@Nullable ConfluenceUser confluenceUser, Set<Long> spaceIds, String spacePermissionType) Description copied from interface:BulkPermissionServiceReturns a set of permitted space ids.- Specified by:
- getPermittedSpaceIdsin interface- BulkPermissionService
- Parameters:
- confluenceUser- confluence user.
- spaceIds- space ids.
- spacePermissionType- - permission type. Only "VIEWSPACE" or "EDITSPACE" are supported.
- Returns:
- set of permitted spaces
 
- 
getVisibleChildPagespublic Map<Long,List<SimpleContent>> getVisibleChildPages(@Nullable ConfluenceUser confluenceUser, Set<Long> parentPageIdSet, boolean checkInheritedPermissions) Receives a set of page ids as a parameter and finds all visible children for them. Users from "confluence-administrators" group are exempt from permission checks - they will get all existing pages.- Specified by:
- getVisibleChildPagesin interface- BulkPermissionService
- Parameters:
- confluenceUser- the Confluence user, null if anonymous
- parentPageIdSet- set of parent page ids
- Returns:
- a list of SimpleContententities representing the child pages visible to the user
 
- 
getVisibleTopLevelPagespublic List<SimpleContent> getVisibleTopLevelPages(@Nullable ConfluenceUser confluenceUser, long spaceId) Finds all visible top-level pages. Users from "confluence-administrators" group are exempt from permission checks - they will get all existing pages.- Specified by:
- getVisibleTopLevelPagesin interface- BulkPermissionService
- Parameters:
- confluenceUser- the Confluence user, null if anonymous
- spaceId- the space ID
- Returns:
- a list of SimpleContententities representing the child pages visible to the user
 
- 
getAllVisiblePagesInSpacepublic List<SimpleContent> getAllVisiblePagesInSpace(@Nullable ConfluenceUser confluenceUser, long spaceId) Returns the full list of visible pages in the space. Users from "confluence-administrators" group are exempt from permission checks - they will get all existing pages.- Specified by:
- getAllVisiblePagesInSpacein interface- BulkPermissionService
- Parameters:
- confluenceUser- the Confluence user, null if anonymous
- spaceId- the space ID
- Returns:
- a list of SimpleContententities representing all pages visible to the user in a space
 
- 
getVisiblePageIdspublic Set<Long> getVisiblePageIds(@Nullable ConfluenceUser confluenceUser, Set<Long> pageIds, boolean checkSpacePermissions) Returns a set of visible page ids. checkSpacePermissions must be set to true if permissions for spaces were not checked. checkSpacePermissions can be set to false if we already checked permissions for the their spaces. It allows to avoid unnecessary SQL qeueries.- Specified by:
- getVisiblePageIdsin interface- BulkPermissionService
- Parameters:
- confluenceUser- confluence user.
- pageIds- page ids.
- checkSpacePermissions- if false, "useConfluence" and corresponding space permissions will NOT be checked. If true, "useConfluence" and corresponding space permissions will be checked too.
- Returns:
- set of visible page ids
- Since:
- 7.12.0
 
 
-