Interface AccessModeService
- All Known Implementing Classes:
AccessModeServiceImpl
@ParametersAreNonnullByDefault
@ReturnValuesAreNonnullByDefault
public interface AccessModeService
- Since:
- 6.8.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
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.
-
Method Details
-
getAccessMode
AccessMode getAccessMode()- Returns:
- the maintenance info
- Since:
- 6.8.0
-
updateAccessMode
Update the access mode if the current user is a sysadmin- Parameters:
accessMode
- update the access mode for Confluence- Throws:
ServiceException
- the exception is thrown if the dark feature is not enabled or the access mode cannot be updated- Since:
- 6.8.0
-
isReadOnlyAccessModeEnabled
boolean isReadOnlyAccessModeEnabled()- Returns:
- true if the dark feature "read.only.mode" is enabled and current access mode is READ_ONLY
- Since:
- 6.8.0
-
shouldEnforceReadOnlyAccess
boolean shouldEnforceReadOnlyAccess()- Returns:
- true if we should enforce read only access (without exemptions)
- Since:
- 6.9.0
-
withReadOnlyAccessExemption
Execute a method that needs to be exempt from read-only access check in the permission manager layer.- Type Parameters:
T
- the return type of the method- Parameters:
callable
- the method- Returns:
- the value returned by the callable method
- Throws:
ServiceException
-