@Component public class AccessModeServiceImpl extends Object implements AccessModeService
Constructor and Description |
---|
AccessModeServiceImpl(AccessModeManager accessModeManager,
PermissionManager permissionManager,
com.atlassian.event.api.EventPublisher eventPublisher,
LicenseService licenseService) |
Modifier and Type | Method and Description |
---|---|
AccessMode |
getAccessMode() |
boolean |
isReadOnlyAccessModeEnabled() |
boolean |
shouldEnforceReadOnlyAccess() |
void |
updateAccessMode(AccessMode accessMode)
Update the access mode if the current user is a sysadmin
|
<T> T |
withReadOnlyAccessExemption(Callable<T> callable)
Execute a method that needs to be exempt from read-only access check in the permission manager layer.
|
@Autowired public AccessModeServiceImpl(AccessModeManager accessModeManager, PermissionManager permissionManager, com.atlassian.event.api.EventPublisher eventPublisher, LicenseService licenseService)
public AccessMode getAccessMode()
getAccessMode
in interface AccessModeService
public void updateAccessMode(AccessMode accessMode) throws ServiceException
AccessModeService
updateAccessMode
in interface AccessModeService
accessMode
- update the access mode for ConfluenceServiceException
- the exception is thrown if the dark feature is not enabled or the access mode cannot be updatedpublic boolean isReadOnlyAccessModeEnabled()
isReadOnlyAccessModeEnabled
in interface AccessModeService
public boolean shouldEnforceReadOnlyAccess()
shouldEnforceReadOnlyAccess
in interface AccessModeService
public <T> T withReadOnlyAccessExemption(Callable<T> callable) throws ServiceException
AccessModeService
withReadOnlyAccessExemption
in interface AccessModeService
T
- the return type of the methodcallable
- the methodServiceException
Copyright © 2003–2020 Atlassian. All rights reserved.