Class ReverseProxySetupMonitor
- All Implemented Interfaces:
ExtensionPoint,ModelObject,SearchableModelObject,SearchItem,org.kohsuke.stapler.StaplerProxy
Have the JavaScript make an AJAX call, to which we respond with 302 redirect. If the reverse proxy
is done correctly, this will be handled by web methods, but otherwise we'll report that as an error.
Unfortunately, XmlHttpRequest doesn't expose properties that allow the client-side JavaScript
to learn the details of the failure, so we have to make do with limited information.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.AdministrativeMonitor
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponseDepending on whether the user said "yes" or "no", send him to the right place.org.kohsuke.stapler.HttpResponsedoTest(org.kohsuke.stapler.StaplerRequest request, boolean testWithContext) Required permission to view this admin monitor.voidbooleanReturns true if this monitor is activated and wants to produce a warning message.Methods inherited from class hudson.model.AdministrativeMonitor
all, disable, doDisable, getSearchUrl, getTarget, getUrl, isEnabled, isSecurityMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Constructor Details
-
ReverseProxySetupMonitor
public ReverseProxySetupMonitor()
-
-
Method Details
-
isActivated
public boolean isActivated()Description copied from class:AdministrativeMonitorReturns true if this monitor is activated and wants to produce a warning message.This method is called from the HTML rendering thread, so it should run efficiently.
- Specified by:
isActivatedin classAdministrativeMonitor
-
doTest
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("2.235") public org.kohsuke.stapler.HttpResponse doTest(org.kohsuke.stapler.StaplerRequest request, @QueryParameter boolean testWithContext) -
getTestForReverseProxySetup
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("2.235") @StaplerDispatchable public void getTestForReverseProxySetup(String rest) -
getRequiredPermission
Description copied from class:AdministrativeMonitorRequired permission to view this admin monitor. By defaultJenkins.ADMINISTER, butJenkins.SYSTEM_READis also supported.Changing this permission check to return
Jenkins.SYSTEM_READwill make the active administrative monitor appear onmanage.jellyand on the globally visibleAdministrativeMonitorsDecoratorto users without Administer permission.AdministrativeMonitor.doDisable(StaplerRequest, StaplerResponse)will still always require Administer permission.Implementers need to ensure that
doActand other web methods perform necessary permission checks: Users with System Read permissions are expected to be limited to read-only access. Form UI elements that change system state, e.g. toggling a feature on or off, need to be hidden from users lacking Administer permission.- Overrides:
getRequiredPermissionin classAdministrativeMonitor
-
doAct
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("2.235") public org.kohsuke.stapler.HttpResponse doAct(@QueryParameter String no) throws IOException Depending on whether the user said "yes" or "no", send him to the right place.- Throws:
IOException
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classAdministrativeMonitor
-