Class RecoveryModeAwareApplicationService

java.lang.Object
com.atlassian.crowd.manager.application.ApplicationServiceGeneric
com.atlassian.crowd.manager.recovery.RecoveryModeAwareApplicationService
All Implemented Interfaces:
ApplicationService

public class RecoveryModeAwareApplicationService extends ApplicationServiceGeneric
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
  • Constructor Details

  • Method Details

    • getActiveDirectories

      protected List<Directory> getActiveDirectories(Application application)
      Description copied from class: ApplicationServiceGeneric
      Given an application, retrieve all active directories associated with it.
      Overrides:
      getActiveDirectories in class ApplicationServiceGeneric
      Parameters:
      application - application to query
      Returns:
      list of active directories associated with application
    • isUserAuthorised

      public boolean isUserAuthorised(Application application, String username)
      Description copied from interface: ApplicationService
      Returns true if the user is permitted to attempt authentication with the application. If the user could not be found, then false is returned.

      For a user to have access to an application:

      1. the Application must be active.
      2. 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 interface ApplicationService
      Overrides:
      isUserAuthorised in class ApplicationServiceGeneric
      Parameters:
      application - application user is authenticating against
      username - 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

      public boolean isUserAuthorised(Application application, User user)
      Description copied from interface: ApplicationService
      Returns true if the user is permitted to attempt authentication with the application. If the user could not be found, then false is returned.

      For a user to have access to an application:

      1. the Application must be active.
      2. 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 interface ApplicationService
      Overrides:
      isUserAuthorised in class ApplicationServiceGeneric
      Parameters:
      application - application user is authenticating against
      user - 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.