Interface RecoveryMode

All Known Implementing Classes:
DefaultRecoveryMode, DisabledRecoveryMode, StaticRecoveryMode

public interface RecoveryMode
Abstraction for interacting with recovery mode. In recovery mode a special 'recovery admin' is able to login with a password specified at the command line. This gives customers who lock themselves out the ability to login and fix any problems.
Since:
7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    io.atlassian.fugue.Option<String>
    Tells the caller the name of the 'recovery admin'.
    boolean
    Tells the caller if JIRA is in recovery mode.
    boolean
    Tells if the caller if the passed ApplicationUser is the 'recovery admin'.
    boolean
    Tells the caller if the passed username is associated with the 'recovery admin'.
  • Method Details

    • isRecoveryModeOn

      boolean isRecoveryModeOn()
      Tells the caller if JIRA is in recovery mode.
      Returns:
      true JIRA is in recovery mode or false otherwise.
    • isRecoveryUser

      boolean isRecoveryUser(ApplicationUser user)
      Tells if the caller if the passed ApplicationUser is the 'recovery admin'.
      Returns:
      true if the passed ApplicationUser is the 'recovery admin' and recovery mode is enabled.
    • isRecoveryUsername

      boolean isRecoveryUsername(String username)
      Tells the caller if the passed username is associated with the 'recovery admin'.
      Parameters:
      username - the username to check.
      Returns:
      true if the passed name is the 'recovery admin' and recovery mode is enabled.
    • getRecoveryUsername

      io.atlassian.fugue.Option<String> getRecoveryUsername()
      Tells the caller the name of the 'recovery admin'.
      Returns:
      the name of the user who is considered to be the 'recovery admin' or Option.none() if there is no 'recovery admin' active.