Class RejectedAccessException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException
- All Implemented Interfaces:
Serializable
Thrown when access to a language element was not permitted.
- See Also:
-
Constructor Summary
ConstructorDescriptionRejectedAccessException
(String message) Rejects access to something which the currentStaticWhitelist
format could not describe.RejectedAccessException
(String type, String details) Rejects access to a well-described script element.RejectedAccessException
(String type, String details, String info) Rejects access to a well-described script element. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
Gets the signature of the member to which access was rejected.boolean
True ifgetSignature()
is non-null but it would be a bad idea for an administrator to approve it.void
setDangerous
(boolean dangerous) You may set this flag if you think it would be a security risk for this signature to be approved.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RejectedAccessException
Rejects access to a well-described script element. Normally called fromStaticWhitelist.rejectMethod(java.lang.reflect.Method)
or similar.- Parameters:
type
- e.g.field
details
- e.g.some.Class fieldName
-
RejectedAccessException
Rejects access to a well-described script element. Normally called fromStaticWhitelist.rejectMethod(java.lang.reflect.Method)
or similar.- Parameters:
type
- e.g.field
details
- e.g.some.Class fieldName
info
- some additional information if appropriate
-
RejectedAccessException
Rejects access to something which the currentStaticWhitelist
format could not describe.- Parameters:
message
- a descriptive message in no particular format
-
-
Method Details
-
getSignature
Gets the signature of the member to which access was rejected.- Returns:
- a line in the format understood by
StaticWhitelist
, or null in case something was rejected for which a known exemption is not available
-
isDangerous
public boolean isDangerous()True ifgetSignature()
is non-null but it would be a bad idea for an administrator to approve it.- Since:
- 1.16
-
setDangerous
public void setDangerous(boolean dangerous) You may set this flag if you think it would be a security risk for this signature to be approved.- Throws:
IllegalArgumentException
- in case you tried to set this to true when using the nonspecificRejectedAccessException(String)
constructor- Since:
- 1.16
-