@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class StaplerDispatchValidator extends Object implements org.kohsuke.stapler.DispatchValidator
StaplerViews
/StaplerFragments
along
with whitelist entries specified by the default views whitelist and the optionally defined whitelist specified
by the system property jenkins.security.stapler.StaplerDispatchValidator.whitelist
. Then,
the model class's superclass and interfaces are recursively inspected adding views and fragments that do not
conflict with the views and fragments already declared. This effectively allows model classes to override
parent classes.l:view
Jelly tag. As this validation comes later, annotations will take
precedence over the use or lack of a layout tag.Validation can be disabled by setting the system property
jenkins.security.stapler.StaplerDispatchValidator.disabled=true
or setting DISABLED
to
true
in the script console.
Modifier and Type | Field and Description |
---|---|
static boolean |
DISABLED
Escape hatch to disable dispatch validation.
|
Constructor and Description |
---|
StaplerDispatchValidator() |
Modifier and Type | Method and Description |
---|---|
void |
allowDispatch(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
Boolean |
isDispatchAllowed(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
Boolean |
isDispatchAllowed(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String viewName,
Object node) |
void |
requireDispatchAllowed(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
@CheckForNull public Boolean isDispatchAllowed(@NonNull org.kohsuke.stapler.StaplerRequest req, @NonNull org.kohsuke.stapler.StaplerResponse rsp)
isDispatchAllowed
in interface org.kohsuke.stapler.DispatchValidator
@CheckForNull public Boolean isDispatchAllowed(@NonNull org.kohsuke.stapler.StaplerRequest req, @NonNull org.kohsuke.stapler.StaplerResponse rsp, @NonNull String viewName, @CheckForNull Object node)
isDispatchAllowed
in interface org.kohsuke.stapler.DispatchValidator
public void allowDispatch(@NonNull org.kohsuke.stapler.StaplerRequest req, @NonNull org.kohsuke.stapler.StaplerResponse rsp)
allowDispatch
in interface org.kohsuke.stapler.DispatchValidator
public void requireDispatchAllowed(@NonNull org.kohsuke.stapler.StaplerRequest req, @NonNull org.kohsuke.stapler.StaplerResponse rsp) throws org.kohsuke.stapler.CancelRequestHandlingException
requireDispatchAllowed
in interface org.kohsuke.stapler.DispatchValidator
org.kohsuke.stapler.CancelRequestHandlingException
Copyright © 2004–2021. All rights reserved.