@Transactional public class CachingApplicationService extends AbstractDelegatingApplicationService
| Constructor and Description |
|---|
CachingApplicationService(ApplicationService applicationService,
UserAuthorisationCache userAuthorisationCache) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUserAuthorised(Application application,
String username)
Returns true if the user is permitted to attempt authentication with the application.
|
void |
removeUser(Application application,
String user)
Removes the user from the first active directory they are found in.
|
User |
renameUser(Application application,
String oldUserName,
String newUsername)
Renames the user in the first active directory the users exists in.
|
addAllUsers, addGroup, addGroupToGroup, addUser, addUserToGroup, authenticateUser, findGroupByName, findGroupWithAttributesByName, findUserByKey, findUserByName, findUserWithAttributesByKey, findUserWithAttributesByName, findWebhookById, getApplicationService, getCapabilitiesForNewUsers, getCurrentEventToken, getNewEvents, isGroupDirectGroupMember, isGroupNestedGroupMember, isUserDirectGroupMember, isUserNestedGroupMember, registerWebhook, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUserAttributes, removeUserFromGroup, searchDirectGroupRelationships, searchGroups, searchNestedGroupRelationships, searchUsers, searchUsersAllowingDuplicateNames, storeGroupAttributes, storeUserAttributes, unregisterWebhook, updateGroup, updateUser, updateUserCredentialpublic CachingApplicationService(ApplicationService applicationService, UserAuthorisationCache userAuthorisationCache)
public boolean isUserAuthorised(Application application, String username)
ApplicationServiceFor a user to have access to an application:
isUserAuthorised in interface ApplicationServiceisUserAuthorised in class AbstractDelegatingApplicationServiceapplication - application user is authenticating againstusername - usernamepublic User renameUser(Application application, String oldUserName, String newUsername) throws UserNotFoundException, OperationFailedException, ApplicationPermissionException, InvalidUserException
ApplicationServiceUserNotFoundException will be thrown.
If the rename operation is not allowed on the User's directory, an
ApplicationPermissionException is thrown.
If the rename operation fails on a directory for any other reason,
such as directory failure, update failure, etc., an Exception
is thrown immediately.
Returns the renamed User.renameUser in interface ApplicationServicerenameUser in class AbstractDelegatingApplicationServiceapplication - application with assigned directories to operate on.oldUserName - current username of the user to rename.newUsername - new username of the renamed user.UserNotFoundException - user does not exist in any of the associated active directories of the application.OperationFailedException - underlying directory implementation failed to execute the operation.ApplicationPermissionException - if the User's directory is not allowed to perform operations of type OperationType.UPDATE_USER.InvalidUserException - if the new username does not meet the username requirements for an associated directory.public void removeUser(Application application, String user) throws OperationFailedException, UserNotFoundException, ApplicationPermissionException
ApplicationServiceUserNotFoundException
will be thrown.
If the remove operation fails because of permission restrictions, an ApplicationPermissionException is thrown.
removeUser in interface ApplicationServiceremoveUser in class AbstractDelegatingApplicationServiceapplication - remove from application's assigned directories.user - the name of the user to remove.OperationFailedException - underlying directory implementation failed to execute the operation.UserNotFoundException - if user with given name does not exist in ANY assigned directory.ApplicationPermissionException - if the User's directory does not have permission to perform operations of type OperationType.DELETE_USER.Copyright © 2016 Atlassian. All Rights Reserved.