Class UpdateSiteWarningsMonitor
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.AdministrativeMonitor
-
- jenkins.security.UpdateSiteWarningsMonitor
-
- All Implemented Interfaces:
ExtensionPoint,ModelObject,SearchableModelObject,SearchItem,org.kohsuke.stapler.StaplerProxy
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class UpdateSiteWarningsMonitor extends AdministrativeMonitor
Administrative monitor showing plugin/core warnings published by the configured update site to the user.Terminology overview:
- Applicable warnings are those relevant to currently installed components
- Active warnings are those actually shown to users.
- Hidden warnings are those _not_ shown to users due to them being configured to be hidden.
- Inapplicable warnings are those that are not applicable.
The following sets may be non-empty:
- Intersection of applicable and active
- Intersection of applicable and hidden
- Intersection of hidden and inapplicable (although not really relevant)
- Intersection of inapplicable and neither hidden nor active
The following sets must necessarily be empty:
- Intersection of applicable and inapplicable
- Intersection of active and hidden
- Intersection of active and inapplicable
- Since:
- 2.40
-
-
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 Constructor Description UpdateSiteWarningsMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.kohsuke.stapler.HttpResponsedoForward(String fix, String configure)Redirects the user to the plugin manager or security configurationList<UpdateSite.Warning>getActiveCoreWarnings()Map<PluginWrapper,List<UpdateSite.Warning>>getActivePluginWarningsByPlugin()StringgetDisplayName()PermissiongetRequiredPermission()Required permission to view this admin monitor.booleanhasApplicableHiddenWarnings()Returns true iff there are applicable but ignored (i.e.booleanisActivated()Returns true if this monitor is activated and wants to produce a warning message.booleanisSecurity()Returns true if this monitor is security related.-
Methods inherited from class hudson.model.AdministrativeMonitor
all, disable, doDisable, getSearchUrl, getTarget, getUrl, isEnabled
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Method Detail
-
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
-
isSecurity
public boolean isSecurity()
Description copied from class:AdministrativeMonitorReturns true if this monitor is security related. This will be used to determine which icon will be used in the navigation bar.- Overrides:
isSecurityin classAdministrativeMonitor
-
getActiveCoreWarnings
public List<UpdateSite.Warning> getActiveCoreWarnings()
-
getActivePluginWarningsByPlugin
public Map<PluginWrapper,List<UpdateSite.Warning>> getActivePluginWarningsByPlugin()
-
doForward
public org.kohsuke.stapler.HttpResponse doForward(@QueryParameter String fix, @QueryParameter String configure)Redirects the user to the plugin manager or security configuration
-
hasApplicableHiddenWarnings
public boolean hasApplicableHiddenWarnings()
Returns true iff there are applicable but ignored (i.e. hidden) warnings.- Returns:
- true iff there are applicable but ignored (i.e. hidden) warnings.
-
getRequiredPermission
public Permission 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
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classAdministrativeMonitor
-
-