Class AdvancedBulkPermissionServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.security.denormalisedpermissions.impl.AdvancedBulkPermissionServiceImpl
-
- All Implemented Interfaces:
AdvancedBulkPermissionService
public class AdvancedBulkPermissionServiceImpl extends Object implements AdvancedBulkPermissionService
- Since:
- 7.12.0
-
-
Constructor Summary
Constructors Constructor Description AdvancedBulkPermissionServiceImpl(DenormalisedPermissionStateManager denormalisedPermissionStateManager, DenormalisedSidManager denormalisedSidManager, ConfluenceAccessManager confluenceAccessManager, com.atlassian.event.api.EventPublisher eventPublisher, DenormalisedContentChangeLogListener denormalisedContentChangeLogListener, DenormalisedSpaceChangeLogListener denormalisedSpaceChangeLogListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flushPermissionsQueue()
Used for acceptance tests when sync operations are required.Set<Long>
getAllUserSids(@Nullable ConfluenceUser confluenceUser)
Returns all sids for the user.String
getDatabaseDialect()
boolean
isApiUpAndRunning()
boolean
isContentApiUpAndRunning()
boolean
isSpaceApiUpAndRunning()
boolean
isUserSuperAdmin(Set<Long> userSids)
Checks if this user belongs to confluence-administrators.
-
-
-
Constructor Detail
-
AdvancedBulkPermissionServiceImpl
@Autowired public AdvancedBulkPermissionServiceImpl(DenormalisedPermissionStateManager denormalisedPermissionStateManager, DenormalisedSidManager denormalisedSidManager, ConfluenceAccessManager confluenceAccessManager, com.atlassian.event.api.EventPublisher eventPublisher, DenormalisedContentChangeLogListener denormalisedContentChangeLogListener, DenormalisedSpaceChangeLogListener denormalisedSpaceChangeLogListener)
-
-
Method Detail
-
getAllUserSids
public Set<Long> getAllUserSids(@Nullable ConfluenceUser confluenceUser)
Returns all sids for the user. Could be used if the plugin wants to work fast permissions tables directly (for example, join them). Fast permissions state must be checked before calling this method.- Specified by:
getAllUserSids
in interfaceAdvancedBulkPermissionService
- Parameters:
confluenceUser
- user- Returns:
- all sids for the user
-
isUserSuperAdmin
public boolean isUserSuperAdmin(Set<Long> userSids)
Checks if this user belongs to confluence-administrators. If this function returns true, this user has access to all the content regardless of configured permissions.- Specified by:
isUserSuperAdmin
in interfaceAdvancedBulkPermissionService
- Parameters:
userSids
- set of users sids- Returns:
- true is user is super admin (part of confluence-administrators group)
-
getDatabaseDialect
public String getDatabaseDialect()
- Specified by:
getDatabaseDialect
in interfaceAdvancedBulkPermissionService
- Returns:
- database dialect.
-
isApiUpAndRunning
public boolean isApiUpAndRunning()
- Specified by:
isApiUpAndRunning
in interfaceAdvancedBulkPermissionService
- Returns:
- true is fast permissions service is up and running or false if at least one of the services (SPACE or CONTENT) is not in READY state.
-
isSpaceApiUpAndRunning
public boolean isSpaceApiUpAndRunning()
- Specified by:
isSpaceApiUpAndRunning
in interfaceAdvancedBulkPermissionService
- Returns:
- true is SPACE fast permissions service is up and running or false if SPACE service is not in READY state.
-
isContentApiUpAndRunning
public boolean isContentApiUpAndRunning()
- Specified by:
isContentApiUpAndRunning
in interfaceAdvancedBulkPermissionService
- Returns:
- true is CONTENT fast permissions service is up and running or false if CONTENT service is not in READY state.
-
flushPermissionsQueue
public void flushPermissionsQueue()
Description copied from interface:AdvancedBulkPermissionService
Used for acceptance tests when sync operations are required. Mostly used for tests.- Specified by:
flushPermissionsQueue
in interfaceAdvancedBulkPermissionService
-
-