public class

AjaxHeaders

extends Object
java.lang.Object
   ↳ com.atlassian.jira.web.action.AjaxHeaders

Class Overview

Utility class for dealing with AJAX request headers.

Summary

Public Constructors
AjaxHeaders()
Public Methods
static boolean isPjaxRequest(HttpServletRequest request)
Returns true if the HTTP request contains the {@value #X_PJAX} header.
static boolean requestUsernameMatches(HttpServletRequest request, User user)
Checks whether the effective user has change between the time when the view issue page was loaded and the time when the current request was made (this can happen due to session timeouts, logging out in another window, etc).
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AjaxHeaders ()

Public Methods

public static boolean isPjaxRequest (HttpServletRequest request)

Returns true if the HTTP request contains the {@value #X_PJAX} header.

Parameters
request a JiraWebActionSupport
Returns
  • a boolean

public static boolean requestUsernameMatches (HttpServletRequest request, User user)

Checks whether the effective user has change between the time when the view issue page was loaded and the time when the current request was made (this can happen due to session timeouts, logging out in another window, etc).

This method looks at the {@value #X_AUSERNAME} request header to determine the user that was effective at the time the page was loaded. If the request header is not present, then that is considered a match with anything.

Parameters
request a HttpServletRequest
user a User
Returns
  • true if the request