Class AuthorizeProjectProperty
- All Implemented Interfaces:
ExtensionPoint
,Describable<JobProperty<?>>
,ReconfigurableDescribable<JobProperty<?>>
,BuildStep
Specifies how to authorize its builds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The action that allows configuring a jobs authorization.static class
Descriptor forAuthorizeProjectProperty
.static class
The action factory responsible for adding theAuthorizeProjectProperty.AuthorizationAction
.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.JobProperty
owner
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(Queue.Item item) Return the authorization for a build.Gets the strategy if enabled ornull
if not enabled.Gets the strategy.JobProperty<?>
reconfigure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) static void
Ensure that deserialization failures in this field result in a failure to deserialize the job.Methods inherited from class hudson.model.JobProperty
getDescriptor, getJobAction, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform, prebuild, reconfigure, setOwner
-
Constructor Details
-
AuthorizeProjectProperty
Create a new instance.- Parameters:
strategy
- the strategy
-
-
Method Details
-
getStrategy
Gets the strategy.- Returns:
- the strategy.
-
getEnabledStrategy
Gets the strategy if enabled ornull
if not enabled.- Returns:
- strategy only when it's enabled.
null
otherwise.
-
authenticate
Return the authorization for a build.- Parameters:
item
- the item in queue, which will be a build.- Returns:
- authorization for this build.
- See Also:
-
setStrategyCritical
Ensure that deserialization failures in this field result in a failure to deserialize the job. This method is responsible for ensuring that POSTing config.xml respects the defined strategy. -
reconfigure
public JobProperty<?> reconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) throws Descriptor.FormException - Specified by:
reconfigure
in interfaceReconfigurableDescribable<JobProperty<?>>
- Overrides:
reconfigure
in classJobProperty<Job<?,
?>> - Throws:
Descriptor.FormException
-