Class PermissionDeniedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.google.gerrit.extensions.restapi.RestApiException
-
- com.google.gerrit.extensions.restapi.AuthException
-
- com.google.gerrit.server.permissions.PermissionDeniedException
-
- All Implemented Interfaces:
Serializable
public class PermissionDeniedException extends AuthException
This signals that some permission check failed. The message is short so it can print on a single-line in the Git output.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
MESSAGE_PREFIX
-
Constructor Summary
Constructors Constructor Description PermissionDeniedException(GerritPermission permission)
PermissionDeniedException(GerritPermission permission, String resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describePermission()
Optional<String>
getResource()
-
Methods inherited from class com.google.gerrit.extensions.restapi.AuthException
getAdvice, setAdvice
-
Methods inherited from class com.google.gerrit.extensions.restapi.RestApiException
caching, setCaching, wrap
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
MESSAGE_PREFIX
public static final String MESSAGE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PermissionDeniedException
public PermissionDeniedException(GerritPermission permission)
-
PermissionDeniedException
public PermissionDeniedException(GerritPermission permission, String resource)
-
-