Class FolderScope
java.lang.Object
io.jenkins.plugins.credentials.secretsmanager.FolderScope
- All Implemented Interfaces:
Serializable
Represents the folder scope for a credential.
A credential with folder scope is only accessible from jobs within the specified folders
and their subfolders (hierarchical matching).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FolderScopeglobal()Creates a global scope (accessible from anywhere).inthashCode()booleanisAccessibleFrom(String requestingFolderPath) Checks if this credential is accessible from the specified requesting folder path.booleanisGlobal()Checks if this scope is global (no folder restrictions).static FolderScopeCreates a FolderScope from one or more folder paths.static FolderScopeParses a comma-separated list of folder paths into a FolderScope.toString()
-
Method Details
-
global
Creates a global scope (accessible from anywhere).- Returns:
- a global FolderScope
-
of
Creates a FolderScope from one or more folder paths.- Parameters:
paths- the folder paths- Returns:
- a FolderScope with the specified paths
-
parse
Parses a comma-separated list of folder paths into a FolderScope.- Parameters:
commaSeparated- comma-separated folder paths (e.g., "engineering/backend,qa/staging")- Returns:
- a FolderScope with the parsed paths
-
isGlobal
public boolean isGlobal()Checks if this scope is global (no folder restrictions).- Returns:
- true if global, false otherwise
-
isAccessibleFrom
Checks if this credential is accessible from the specified requesting folder path. Uses hierarchical matching: credentials are accessible from the specified folder and all child folders.- Parameters:
requestingFolderPath- the folder path from which access is requested (null means global/root context)- Returns:
- true if accessible, false otherwise
-
getFolderPaths
-
equals
-
hashCode
public int hashCode() -
toString
-