Class RoleBasedProjectNamingStrategy
java.lang.Object
jenkins.model.ProjectNamingStrategy
org.jenkinsci.plugins.rolestrategy.RoleBasedProjectNamingStrategy
- All Implemented Interfaces:
ExtensionPoint
,Describable<ProjectNamingStrategy>
,Serializable
A Naming Strategy so that users with only item specific create permissions can create only items matching the role
pattern.
- Since:
- 2.2.0
- Author:
- Kanstantsin Shautsou
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Descriptor.Nested classes/interfaces inherited from class jenkins.model.ProjectNamingStrategy
ProjectNamingStrategy.DefaultProjectNamingStrategy, ProjectNamingStrategy.PatternProjectNamingStrategy, ProjectNamingStrategy.ProjectNamingStrategyDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class jenkins.model.ProjectNamingStrategy
DEFAULT_NAMING_STRATEGY
-
Constructor Summary
-
Method Summary
Methods inherited from class jenkins.model.ProjectNamingStrategy
all, getDescriptor
-
Constructor Details
-
RoleBasedProjectNamingStrategy
@DataBoundConstructor public RoleBasedProjectNamingStrategy(boolean forceExistingJobs)
-
-
Method Details
-
checkName
- Overrides:
checkName
in classProjectNamingStrategy
- Throws:
Failure
-
checkName
Checks if the given name and parentName match a role pattern.- Overrides:
checkName
in classProjectNamingStrategy
- Parameters:
parentName
- Name of the parent item in which the new item should be created.name
- The name of the item that should be created.- Throws:
Failure
- When the name is not allowed orItem.CREATE
permission is missing
-
isForceExistingJobs
public boolean isForceExistingJobs()- Overrides:
isForceExistingJobs
in classProjectNamingStrategy
-