Package com.atlassian.confluence.user
Interface DisabledUserManager
- All Known Implementing Classes:
CrowdDisabledUserManager
public interface DisabledUserManager
Manages the underlying changes to enable and disable users. Clients should not normally use
this API directly, but instead call
UserAccessor.isDeactivated(String)
or
UserAccessor.deactivateUser(com.atlassian.user.User)
which take care of
checking permissions and firing appropriate events.- Since:
- 3.5
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disableEnableUserLocally
(com.atlassian.crowd.embedded.api.User user, boolean doEnable) Disables the specified user in the internal confluence directory.void
disableUser
(com.atlassian.crowd.embedded.api.User user) Disables the specified user.void
enableUser
(com.atlassian.crowd.embedded.api.User user) Enables the specified user.boolean
isDisabled
(com.atlassian.crowd.embedded.api.User user) Returnstrue
if the specified user is deactivated or does not exist, otherwisefalse
.boolean
isDisabled
(com.atlassian.user.User user) boolean
isDisabled
(String username) Returnstrue
if the user with the specified username is deactivated or does not exist, otherwisefalse
.
-
Method Details
-
isDisabled
boolean isDisabled(com.atlassian.crowd.embedded.api.User user) Returnstrue
if the specified user is deactivated or does not exist, otherwisefalse
. Returnsfalse
if the user is null, indicating an anonymous user.- Returns:
- true if the specified user exists and is deactivated, otherwise false.
-
isDisabled
boolean isDisabled(com.atlassian.user.User user) - Returns:
- true if the specified user exists and is deactivated, otherwise false.
- Since:
- 7.17
-
isDisabled
Returnstrue
if the user with the specified username is deactivated or does not exist, otherwisefalse
. Returnsfalse
if the username is null, indicating an anonymous user.- Returns:
- true if the user with the specified username exists and is deactivated, otherwise false.
-
disableUser
void disableUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.user.impl.EntityValidationException, UserManagementOperationFailedException Disables the specified user. Does nothing if the user is already disabled.- Parameters:
user
- the user to disable- Throws:
com.atlassian.crowd.exception.UserNotFoundException
- if the user does not existNullPointerException
- if the user is nullcom.atlassian.user.impl.EntityValidationException
UserManagementOperationFailedException
-
disableEnableUserLocally
void disableEnableUserLocally(com.atlassian.crowd.embedded.api.User user, boolean doEnable) throws com.atlassian.user.impl.EntityValidationException, UserManagementOperationFailedException Disables the specified user in the internal confluence directory. Does nothing if the user is already disabled.- Parameters:
user
- the user to disabledoEnable
- whether to enable or disable- Throws:
com.atlassian.crowd.exception.UserNotFoundException
- if the user does not existcom.atlassian.user.impl.EntityValidationException
UserManagementOperationFailedException
-
enableUser
void enableUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.user.impl.EntityValidationException, UserManagementOperationFailedException Enables the specified user. Does nothing if the user is already enabled.- Parameters:
user
- the user to enable- Throws:
com.atlassian.crowd.exception.UserNotFoundException
- if the user does not existNullPointerException
- if the user is nullcom.atlassian.user.impl.EntityValidationException
UserManagementOperationFailedException
-