Class BambooWebSudoManagerImpl

java.lang.Object
com.atlassian.bamboo.sal.BambooWebSudoManagerImpl
All Implemented Interfaces:
BambooWebSudoManager, com.atlassian.sal.api.websudo.WebSudoManager

@Component public class BambooWebSudoManagerImpl extends Object implements BambooWebSudoManager
  • Constructor Details

  • Method Details

    • canExecuteRequest

      public boolean canExecuteRequest(javax.servlet.http.HttpServletRequest request)
      Specified by:
      canExecuteRequest in interface com.atlassian.sal.api.websudo.WebSudoManager
    • enforceWebSudoProtection

      public void enforceWebSudoProtection(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Specified by:
      enforceWebSudoProtection in interface com.atlassian.sal.api.websudo.WebSudoManager
    • willExecuteWebSudoRequest

      public void willExecuteWebSudoRequest(javax.servlet.http.HttpServletRequest request) throws com.atlassian.sal.api.websudo.WebSudoSessionException
      Specified by:
      willExecuteWebSudoRequest in interface com.atlassian.sal.api.websudo.WebSudoManager
      Throws:
      com.atlassian.sal.api.websudo.WebSudoSessionException
    • setWebSudoSession

      public void setWebSudoSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request, @Nullable @Nullable javax.servlet.http.HttpServletResponse response)
      Description copied from interface: BambooWebSudoManager
      Sets the web sudo timestamp on the current session and the web sudo headers if the response is passed.
      Specified by:
      setWebSudoSession in interface BambooWebSudoManager
      Parameters:
      request - the current request
      response - the response for the current request
    • getWebSudoSessionExpiry

      @NotNull public @NotNull Optional<Instant> getWebSudoSessionExpiry(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Description copied from interface: BambooWebSudoManager
      Returns the expiry time of the current web sudo session, if one exists
      Specified by:
      getWebSudoSessionExpiry in interface BambooWebSudoManager
      Parameters:
      request - the current request
      Returns:
      the expiry time of the current web sudo session, if one exists
    • removeWebSudoFromSession

      public void removeWebSudoFromSession(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Description copied from interface: BambooWebSudoManager
      Removes the web sudo attribute from the current session, if one exists
      Specified by:
      removeWebSudoFromSession in interface BambooWebSudoManager
      Parameters:
      request - the current request
    • isUnableToHoldWebSudo

      public boolean isUnableToHoldWebSudo(@Nullable @Nullable javax.servlet.http.HttpServletRequest request)
      Description copied from interface: BambooWebSudoManager
      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.
      Specified by:
      isUnableToHoldWebSudo in interface BambooWebSudoManager
      Parameters:
      request - the current request
      Returns:
      false if the request is able to hold a web sudo session, true otherwise