Package io.jenkins.plugins.prism
Klasse FilePermissionEnforcer
java.lang.Object
io.jenkins.plugins.prism.FilePermissionEnforcer
Enforces security restrictions for viewing files in Jenkins. Some plugins copy source code files to Jenkins' build
folder so that these files can be rendered in the user interface together with build results (coverage, warnings,
etc.). If these files are not part of the workspace of a build, then Jenkins will not show them by default: otherwise
sensitive files could be shown by accident. You can provide a list of additional source code directories that are
allowed to be shown in Jenkins user interface here. Note, that such a directory must be an absolute path on the
agent that executes the build.
- Autor:
- Ullrich Hafner
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
isInWorkspace
(String fileName, FilePath workspace, String... permittedDirectories) Checks whether the specified file is part of Jenkins' workspace or one of the permitted directories.boolean
isInWorkspace
(String fileName, FilePath workspace, Set<String> permittedDirectories) Checks whether the specified file is part of Jenkins' workspace or one of the permitted directories.
-
Konstruktordetails
-
FilePermissionEnforcer
public FilePermissionEnforcer()
-
-
Methodendetails
-
isInWorkspace
Checks whether the specified file is part of Jenkins' workspace or one of the permitted directories.- Parameter:
fileName
- the file name of the sourceworkspace
- the workspace on the agent, files within that folder are always permittedpermittedDirectories
- additional permitted directories- Gibt zurück:
true
if the file is in the workspace,false
otherwise
-
isInWorkspace
Checks whether the specified file is part of Jenkins' workspace or one of the permitted directories.- Parameter:
fileName
- the file name of the sourceworkspace
- the workspace on the agent, files within that folder are always permittedpermittedDirectories
- an additional set of permitted directories- Gibt zurück:
true
if the file is in the workspace,false
otherwise
-