jetbrains.buildServer.web.util
Class WebAuthUtil

java.lang.Object
  extended by jetbrains.buildServer.web.util.WebAuthUtil

public class WebAuthUtil
extends java.lang.Object

Utility class used to process AccessDeniedException.


Field Summary
static java.lang.String ACCESS_DENIED_MESSAGE_KEY
          Message key to use for access denied messages
static java.lang.String TEAM_CITY_AUTHENTICATED_BUILD
          Build Authentication key
 
Constructor Summary
WebAuthUtil()
           
 
Method Summary
static void addAccessDeniedMessage(javax.servlet.http.HttpServletRequest request, AccessDeniedException ex)
          Converts AccessDeniedException into the ActionMessages object and stores it for showing on the web page.
static RequestPermissionsChecker createGuestAccessDeniedChecker(java.lang.String message)
          Creates permissions checker which denies access to guest user.
static java.lang.Long getAuthenticatedBuildId(javax.servlet.http.HttpServletRequest request)
           
static void logAccessDeniedError(javax.servlet.http.HttpServletRequest request, AccessDeniedException ex)
          Logs AccessDeniedException into the server log among with basic information about authority who made an action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEAM_CITY_AUTHENTICATED_BUILD

public static final java.lang.String TEAM_CITY_AUTHENTICATED_BUILD
Build Authentication key

Since:
7.0
See Also:
Constant Field Values

ACCESS_DENIED_MESSAGE_KEY

public static final java.lang.String ACCESS_DENIED_MESSAGE_KEY
Message key to use for access denied messages

See Also:
Constant Field Values
Constructor Detail

WebAuthUtil

public WebAuthUtil()
Method Detail

addAccessDeniedMessage

public static void addAccessDeniedMessage(javax.servlet.http.HttpServletRequest request,
                                          AccessDeniedException ex)
Converts AccessDeniedException into the ActionMessages object and stores it for showing on the web page.

Parameters:
request - request
ex - exception

logAccessDeniedError

public static void logAccessDeniedError(javax.servlet.http.HttpServletRequest request,
                                        AccessDeniedException ex)
Logs AccessDeniedException into the server log among with basic information about authority who made an action.

Parameters:
request - request
ex - exception

createGuestAccessDeniedChecker

public static RequestPermissionsChecker createGuestAccessDeniedChecker(@Nullable
                                                                       java.lang.String message)
Creates permissions checker which denies access to guest user.

Parameters:
message - message to show if access is denied, if null then default message is shown
Returns:
RequestPermissionsChecker

getAuthenticatedBuildId

@Nullable
public static java.lang.Long getAuthenticatedBuildId(javax.servlet.http.HttpServletRequest request)