Class GroovySourceFileAllowlist.DefaultAllowlist
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.cps.GroovySourceFileAllowlist
-
- org.jenkinsci.plugins.workflow.cps.GroovySourceFileAllowlist.DefaultAllowlist
-
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- GroovySourceFileAllowlist
@Extension public static class GroovySourceFileAllowlist.DefaultAllowlist extends GroovySourceFileAllowlist
Allows Groovy source files used to implement DSLs in plugins that were created beforeGroovySourceFileAllowlist
was introduced.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.cps.GroovySourceFileAllowlist
GroovySourceFileAllowlist.DefaultAllowlist
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DefaultAllowlist()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAllowed(String groovySourceFileUrl)
Checks whether a given Groovy source file is allowed to be loaded byCpsFlowExecution.getTrustedShell()
.-
Methods inherited from class org.jenkinsci.plugins.workflow.cps.GroovySourceFileAllowlist
all
-
-
-
-
Constructor Detail
-
DefaultAllowlist
public DefaultAllowlist() throws IOException
- Throws:
IOException
-
-
Method Detail
-
isAllowed
public boolean isAllowed(String groovySourceFileUrl)
Description copied from class:GroovySourceFileAllowlist
Checks whether a given Groovy source file is allowed to be loaded byCpsFlowExecution.getTrustedShell()
.- Specified by:
isAllowed
in classGroovySourceFileAllowlist
- Parameters:
groovySourceFileUrl
- the absolute URL to the Groovy source file as returned byClassLoader.getResource(java.lang.String)
- Returns:
true
if the Groovy source file may be loaded,false
otherwise
-
-