Class ResourceDomainRecommendation
- All Implemented Interfaces:
ExtensionPoint
,ModelObject
,SearchableModelObject
,SearchItem
,org.kohsuke.stapler.StaplerProxy
ResourceDomainConfiguration
to users with the system property
hudson.model.DirectoryBrowserSupport.CSP
set to override
DirectoryBrowserSupport.DEFAULT_CSP_VALUE
.- Since:
- 2.200
- See Also:
-
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
-
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponse
Required permission to view this admin monitor.boolean
Returns true if this monitor is activated and wants to produce a warning message.boolean
Returns true if this monitor is security related.Methods inherited from class hudson.model.AdministrativeMonitor
all, checkRequiredPermission, disable, doDisable, getSearchUrl, getTarget, getUrl, hasPermissionToDisplay, hasRequiredPermission, isEnabled
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
-
Constructor Details
-
ResourceDomainRecommendation
public ResourceDomainRecommendation()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classAdministrativeMonitor
-
isActivated
public boolean isActivated()Description copied from class:AdministrativeMonitor
Returns 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:
isActivated
in classAdministrativeMonitor
-
doAct
public org.kohsuke.stapler.HttpResponse doAct(@QueryParameter String redirect, @QueryParameter String dismiss) throws IOException - Throws:
IOException
-
getRequiredPermission
Description copied from class:AdministrativeMonitor
Required permission to view this admin monitor. By defaultJenkins.ADMINISTER
, butJenkins.SYSTEM_READ
orJenkins.MANAGE
are also supported.Changing this permission check to return
Jenkins.SYSTEM_READ
will make the active administrative monitor appear onmanage.jelly
and on the globally visibleAdministrativeMonitorsDecorator
to users without Administer permission.AdministrativeMonitor.doDisable(StaplerRequest2, StaplerResponse2)
will still always require Administer permission.This method only allows for a single permission to be returned. If more complex permission checks are required, override
AdministrativeMonitor.checkRequiredPermission()
andAdministrativeMonitor.hasRequiredPermission()
instead.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.- Overrides:
getRequiredPermission
in classAdministrativeMonitor
-
isSecurity
public boolean isSecurity()Description copied from class:AdministrativeMonitor
Returns true if this monitor is security related. This will be used to determine which icon will be used in the navigation bar.- Overrides:
isSecurity
in classAdministrativeMonitor
-