Class TriggeringUsersAuthorizationStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<AuthorizeProjectStrategy>
org.jenkinsci.plugins.authorizeproject.AuthorizeProjectStrategy
org.jenkinsci.plugins.authorizeproject.strategy.TriggeringUsersAuthorizationStrategy
- All Implemented Interfaces:
ExtensionPoint
,Describable<AuthorizeProjectStrategy>
Run builds as a user who triggered the build.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Our descriptor.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(Job<?, ?> project, Queue.Item item) Returns theAuthentication
for the build.boolean
Tests if the job can be reconfigured by the current user when this strategy is the configured strategy.Methods inherited from class org.jenkinsci.plugins.authorizeproject.AuthorizeProjectStrategy
all, checkAuthorizationConfigurePermission, checkJobConfigurePermission, getDescriptor, hasAuthorizationConfigurePermission, readResolve
-
Constructor Details
-
TriggeringUsersAuthorizationStrategy
@DataBoundConstructor public TriggeringUsersAuthorizationStrategy()Our constructor.
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(Job<?, ?> project, Queue.Item item) Returns theAuthentication
for the build.- Specified by:
authenticate
in classAuthorizeProjectStrategy
- Parameters:
project
- the project to run.item
- the item in queue, which will be a build.- Returns:
true
if authentication was successful
-
hasJobConfigurePermission
Tests if the job can be reconfigured by the current user when this strategy is the configured strategy. Users withJenkins.ADMINISTER
permission skips this check.- Overrides:
hasJobConfigurePermission
in classAuthorizeProjectStrategy
- Parameters:
context
- the context of the job- Returns:
true
if and only if the current user is allowed to reconfigure the specified job.
-