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>
public class TriggeringUsersAuthorizationStrategy extends AuthorizeProjectStrategy
Run builds as a user who triggered the build.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TriggeringUsersAuthorizationStrategy.DescriptorImpl
Our descriptor.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description TriggeringUsersAuthorizationStrategy()
Our constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authentication
authenticate(Job<?,?> project, Queue.Item item)
Returns theAuthentication
for the build.boolean
hasJobConfigurePermission(AccessControlled context)
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, authenticate, checkAuthorizationConfigurePermission, checkJobConfigurePermission, getDescriptor, hasAuthorizationConfigurePermission, readResolve
-
-
-
-
Method Detail
-
authenticate
public Authentication authenticate(Job<?,?> project, Queue.Item item)
Returns theAuthentication
for the build.- Overrides:
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
public boolean hasJobConfigurePermission(AccessControlled context)
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.
-
-