Interface UserManagementHelper
- All Known Implementing Classes:
DefaultUserManagementHelper
,LdapUserManagementHelper
Deprecated.
Abstracts the process of creating/removing/updating users and groups so that we can use external user management
in test cases.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateUser
(String username) Deprecated.void
addGroupToGroup
(Group childGroup, Group parentGroup) Deprecated.Add childGroup to parentGroup.void
addUserToGroup
(User user, Group group) Deprecated.void
addUserToGroup
(String userName, String groupName) Deprecated.void
changePassword
(String username, String newPassword) Deprecated.Change a user's password.void
createGroup
(Group group) Deprecated.void
createGroup
(String groupName) Deprecated.createMultipleUsers
(int numUsers) Deprecated.Helper to create multiple users (callscreateUser(com.atlassian.confluence.it.User)
)createUser
(User user) Deprecated.Creates the user, adds it to the default users group, and ensures the user profile is created (to work around CONF-6404).void
deactivateUser
(String username) Deprecated.void
endBatch()
Deprecated.Flag that the batch transactions are complete, that a sync should be performed immediately, and that syncing should be re-enabled for future requests.void
Deprecated.Ensure that the user's details in the system match those inuser
.getUserGroups
(User user) Deprecated.boolean
Deprecated.Return false if this helper modifies Users, Groups and Group Memberships via RPC (Confluence-managed directories).void
Deprecated.Remove user from the group that has licensed accessvoid
removeGroup
(String groupName) Deprecated.void
removeGroupUncleanly
(Group group) Deprecated.Removes a group but do not remove their dependent permissions.void
removeMultipleUsers
(List<User> users) Deprecated.Removes the list of users (callsremoveUser(User)
)void
removeUser
(User user) Deprecated.void
removeUser
(String username) Deprecated.void
removeUserFromGroup
(User user, Group group) Deprecated.void
removeUserUncleanly
(User user) Deprecated.Removes a user but do not remove their dependent permissions or pages.void
removeUserUncleanly
(String username) Deprecated.Removes a user with the given username but do not remove their dependent permissions or pages.void
renameUser
(String oldUsername, String newUsername) Deprecated.void
resetData
(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group, HashSet<User>> userGroupMembershipsToKeep) Deprecated.Return the User/Group/Membership data to a clean state.void
setAutoSync
(boolean autoSync) Deprecated.void
Deprecated.Flag that a number of user/group transactions are about to be performed in a block, and any syncing should pause until the batch is finished.void
Deprecated.Force a synchronisation with an external user directory.
-
Method Details
-
createUser
Deprecated.Creates the user, adds it to the default users group, and ensures the user profile is created (to work around CONF-6404). -
addUserToGroup
Deprecated. -
addUserToGroup
Deprecated. -
getUserGroups
Deprecated.- Parameters:
user
- the user who's group membership is to be checked.- Returns:
- the set of groups the user belongs to or an empty Set if none.
-
addGroupToGroup
Deprecated.Add childGroup to parentGroup. Does nothing if the membership already exists. -
removeUser
Deprecated. -
removeUser
Deprecated. -
createGroup
Deprecated. -
createGroup
Deprecated. -
removeUserFromGroup
Deprecated. -
removeGroup
Deprecated. -
createMultipleUsers
Deprecated.Helper to create multiple users (callscreateUser(com.atlassian.confluence.it.User)
)- Parameters:
numUsers
- the number of users to create- Returns:
- the list of users created
-
removeMultipleUsers
Deprecated.Removes the list of users (callsremoveUser(User)
)- Parameters:
users
- the list of users to remove
-
removeUserUncleanly
Deprecated.Removes a user with the given username but do not remove their dependent permissions or pages.- Parameters:
username
- the username of the user to remove- Throws:
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the user
-
removeUserUncleanly
Deprecated.Removes a user but do not remove their dependent permissions or pages.- Parameters:
user
- the user to remove- Throws:
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the user
-
removeGroupUncleanly
Deprecated.Removes a group but do not remove their dependent permissions.- Parameters:
group
- the group to remove- Throws:
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the group
-
fixUser
Deprecated.Ensure that the user's details in the system match those inuser
. That is, it finds the user in the system by its username, and sets the full name and email address.- Parameters:
user
- a user to set the details of
-
changePassword
Deprecated.Change a user's password.- Parameters:
username
- Username of the user whose password to changenewPassword
- Password
-
setAutoSync
void setAutoSync(boolean autoSync) Deprecated. -
resetData
void resetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group, HashSet<User>> userGroupMembershipsToKeep) Deprecated.Return the User/Group/Membership data to a clean state.- Parameters:
usersToKeep
-groupsToKeep
-userGroupMembershipsToKeep
-
-
isExternal
boolean isExternal()Deprecated.Return false if this helper modifies Users, Groups and Group Memberships via RPC (Confluence-managed directories). Return true if this helper makes calls to different server, e.g. LDAP or Crowd (externally-managed directories). -
synchronise
void synchronise()Deprecated.Force a synchronisation with an external user directory. -
startBatch
void startBatch()Deprecated.Flag that a number of user/group transactions are about to be performed in a block, and any syncing should pause until the batch is finished. -
endBatch
void endBatch()Deprecated.Flag that the batch transactions are complete, that a sync should be performed immediately, and that syncing should be re-enabled for future requests. -
renameUser
Deprecated. -
deactivateUser
Deprecated. -
activateUser
Deprecated. -
removeFromDefaultLicenseGroup
Deprecated.Remove user from the group that has licensed access
-
UserManager
alternative