Class RecoveryModeAwareApplicationService
java.lang.Object
com.atlassian.crowd.manager.application.ApplicationServiceGeneric
com.atlassian.crowd.manager.recovery.RecoveryModeAwareApplicationService
- All Implemented Interfaces:
ApplicationService
An extension of
ApplicationServiceGeneric
that supports recovery mode. When recovery mode is activated,
an extra directory as provided by the RecoveryModeService
will
be prepended to the list of directories for any application.- Since:
- 2.7.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.crowd.manager.application.ApplicationService
ApplicationService.MembershipsIterable
-
Constructor Summary
ConstructorsConstructorDescriptionRecoveryModeAwareApplicationService
(DirectoryManager directoryManager, SearchStrategyFactory searchStrategyFactory, PermissionManager permissionManager, com.atlassian.event.api.EventPublisher eventPublisher, EventStore eventStore, WebhookRegistry webhookRegistry, AvatarProvider avatarProvider, ApplicationFactory applicationFactory, RecoveryModeService recoveryModeService, AuthenticationOrderOptimizer authenticationOrderOptimizer, AccessFilterFactory accessFilterFactory, CrowdDarkFeatureManager crowdDarkFeatureManager) -
Method Summary
Modifier and TypeMethodDescriptiongetActiveDirectories
(Application application) Given anapplication
, retrieve all active directories associated with it.boolean
isUserAuthorised
(Application application, User user) Returnstrue
if the user is permitted to attempt authentication with the application.boolean
isUserAuthorised
(Application application, String username) Returnstrue
if the user is permitted to attempt authentication with the application.Methods inherited from class com.atlassian.crowd.manager.application.ApplicationServiceGeneric
addAllUsers, addGroup, addGroupToGroup, addUser, addUser, addUserToGroup, authenticateUser, createPagedGroupSearcher, createPagedUserSearcher, expireAllPasswords, findGroupByName, findGroupWithAttributesByName, findRemoteUserByName, findUserByKey, findUserByName, findUserWithAttributesByKey, findUserWithAttributesByName, findWebhookById, getCapabilitiesForNewUsers, getCurrentEventToken, getMemberships, getNewEvents, getUserAvatar, getUserAvatarLink, isGroupDirectGroupMember, isGroupNestedGroupMember, isUserDirectGroupMember, isUserNestedGroupMember, registerWebhook, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameUser, searchDirectGroupRelationships, searchGroups, searchNestedGroupRelationships, searchUsers, setUserStatusLocally, storeGroupAttributes, storeUserAttributes, unregisterWebhook, updateGroup, updateUser, updateUserCredential, userAuthenticated, validateUpdateUser
-
Constructor Details
-
RecoveryModeAwareApplicationService
public RecoveryModeAwareApplicationService(DirectoryManager directoryManager, SearchStrategyFactory searchStrategyFactory, PermissionManager permissionManager, com.atlassian.event.api.EventPublisher eventPublisher, EventStore eventStore, WebhookRegistry webhookRegistry, AvatarProvider avatarProvider, ApplicationFactory applicationFactory, RecoveryModeService recoveryModeService, AuthenticationOrderOptimizer authenticationOrderOptimizer, AccessFilterFactory accessFilterFactory, CrowdDarkFeatureManager crowdDarkFeatureManager)
-
-
Method Details
-
getActiveDirectories
Description copied from class:ApplicationServiceGeneric
Given anapplication
, retrieve all active directories associated with it.- Overrides:
getActiveDirectories
in classApplicationServiceGeneric
- Parameters:
application
- application to query- Returns:
- list of active directories associated with
application
-
isUserAuthorised
Description copied from interface:ApplicationService
Returnstrue
if the user is permitted to attempt authentication with the application. If the user could not be found, thenfalse
is returned.For a user to have access to an application:
- the Application must be active.
- and either:
- the User is stored in a directory which is associated to the Application and the "allow all to authenticate" flag is true.
- the User is a member of a Group that is allowed to authenticate with the Application and both the User and Group are from the same RemoteDirectory.
- Specified by:
isUserAuthorised
in interfaceApplicationService
- Overrides:
isUserAuthorised
in classApplicationServiceGeneric
- Parameters:
application
- application user is authenticating againstusername
- username- Returns:
true</tt> if the user is permitted to attempt authentication with the application, otherwise <tt>false
. If the user could not be found,false
will be returned.
-
isUserAuthorised
Description copied from interface:ApplicationService
Returnstrue
if the user is permitted to attempt authentication with the application. If the user could not be found, thenfalse
is returned.For a user to have access to an application:
- the Application must be active.
- and either:
- the User is stored in a directory which is associated to the Application and the "allow all to authenticate" flag is true.
- the User is a member of a Group that is allowed to authenticate with the Application and both the User and Group are from the same RemoteDirectory.
- Specified by:
isUserAuthorised
in interfaceApplicationService
- Overrides:
isUserAuthorised
in classApplicationServiceGeneric
- Parameters:
application
- application user is authenticating againstuser
- the user that will be checked- Returns:
true</tt> if the user is permitted to attempt authentication with the application, otherwise <tt>false
. If the user could not be found,false
will be returned.
-