@Extension @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class UpdateSiteWarningsMonitor extends AdministrativeMonitor
Terminology overview:
The following sets may be non-empty:
The following sets must necessarily be empty:
ExtensionPoint.LegacyInstancesAreScopedToHudson
id
Constructor and Description |
---|
UpdateSiteWarningsMonitor() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doForward(String fix,
String configure)
Redirects the user to the plugin manager or security configuration
|
List<UpdateSite.Warning> |
getActiveCoreWarnings() |
Map<PluginWrapper,List<UpdateSite.Warning>> |
getActivePluginWarningsByPlugin() |
String |
getDisplayName() |
Permission |
getRequiredPermission()
Required permission to view this admin monitor.
|
boolean |
hasApplicableHiddenWarnings()
Returns true iff there are applicable but ignored (i.e.
|
boolean |
isActivated()
Returns true if this monitor is activated and
wants to produce a warning message.
|
boolean |
isSecurity()
Returns true if this monitor is security related.
|
all, disable, doDisable, getSearchUrl, getTarget, getUrl, isEnabled
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
public boolean isActivated()
AdministrativeMonitor
This method is called from the HTML rendering thread, so it should run efficiently.
isActivated
in class AdministrativeMonitor
public boolean isSecurity()
AdministrativeMonitor
isSecurity
in class AdministrativeMonitor
public List<UpdateSite.Warning> getActiveCoreWarnings()
public Map<PluginWrapper,List<UpdateSite.Warning>> getActivePluginWarningsByPlugin()
public org.kohsuke.stapler.HttpResponse doForward(@QueryParameter String fix, @QueryParameter String configure)
public boolean hasApplicableHiddenWarnings()
public Permission getRequiredPermission()
AdministrativeMonitor
Jenkins.ADMINISTER
, but Jenkins.SYSTEM_READ
is also supported.
Changing this permission check to return Jenkins.SYSTEM_READ
will make the active
administrative monitor appear on manage.jelly
and on the globally visible
AdministrativeMonitorsDecorator
to users without Administer permission.
AdministrativeMonitor.doDisable(StaplerRequest, StaplerResponse)
will still always require Administer permission.
Implementers need to ensure that doAct
and 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.
getRequiredPermission
in class AdministrativeMonitor
public String getDisplayName()
getDisplayName
in interface ModelObject
getDisplayName
in class AdministrativeMonitor
Copyright © 2004–2021. All rights reserved.