Interface BambooWebSudoManager

All Superinterfaces:
com.atlassian.sal.api.websudo.WebSudoManager
All Known Implementing Classes:
BambooWebSudoManagerImpl

public interface BambooWebSudoManager extends com.atlassian.sal.api.websudo.WebSudoManager
An extension of WebSudoManager to provide Bamboo with the ability to start a web sudo session.
Since:
10.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Optional<Instant>
    getWebSudoSessionExpiry(@Nullable javax.servlet.http.HttpServletRequest request)
    Returns the expiry time of the current web sudo session, if one exists
    boolean
    isUnableToHoldWebSudo(@Nullable javax.servlet.http.HttpServletRequest request)
    Checks if the current request is unable to hold a web sudo session.
    void
    removeWebSudoFromSession(@Nullable javax.servlet.http.HttpServletRequest request)
    Removes the web sudo attribute from the current session, if one exists
    void
    setWebSudoSession(@Nullable javax.servlet.http.HttpServletRequest request, @Nullable javax.servlet.http.HttpServletResponse response)
    Sets the web sudo timestamp on the current session and the web sudo headers if the response is passed.

    Methods inherited from interface com.atlassian.sal.api.websudo.WebSudoManager

    canExecuteRequest, enforceWebSudoProtection, willExecuteWebSudoRequest
  • Field Details

  • Method Details

    • setWebSudoSession

      void setWebSudoSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request, @Nullable @Nullable javax.servlet.http.HttpServletResponse response)
      Sets the web sudo timestamp on the current session and the web sudo headers if the response is passed.
      Parameters:
      request - the current request
      response - the response for the current request
    • isUnableToHoldWebSudo

      boolean isUnableToHoldWebSudo(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Checks if the current request is unable to hold a web sudo session. Reasons for this could be that the feature is disabled, the user is not an admin, the user is making a request from a non-allowed IP address, etc.
      Parameters:
      request - the current request
      Returns:
      false if the request is able to hold a web sudo session, true otherwise
    • getWebSudoSessionExpiry

      @NotNull @NotNull Optional<Instant> getWebSudoSessionExpiry(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Returns the expiry time of the current web sudo session, if one exists
      Parameters:
      request - the current request
      Returns:
      the expiry time of the current web sudo session, if one exists
    • removeWebSudoFromSession

      void removeWebSudoFromSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Removes the web sudo attribute from the current session, if one exists
      Parameters:
      request - the current request