Class SystemAuthorizationStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<AuthorizeProjectStrategy>
org.jenkinsci.plugins.authorizeproject.AuthorizeProjectStrategy
org.jenkinsci.plugins.authorizeproject.strategy.SystemAuthorizationStrategy
- All Implemented Interfaces:
ExtensionPoint,Describable<AuthorizeProjectStrategy>
Run builds as
ACL.SYSTEM2. Using this strategy becomes important when
GlobalQueueItemAuthenticator
is forcing jobs to a user other than ACL.SYSTEM2.- Since:
- 1.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOur descriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(Job<?, ?> job, Queue.Item item) Returns theAuthenticationfor the build.protected static SystemAuthorizationStrategygetCurrentStrategy(Job<?, ?> job) ReturnSystemAuthorizationStrategyconfigured in a job.booleanTests if the authorization can be configured by the current user.booleanTests 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, readResolve
-
Constructor Details
-
SystemAuthorizationStrategy
@DataBoundConstructor public SystemAuthorizationStrategy()
-
-
Method Details
-
authenticate
Returns theAuthenticationfor the build.- Specified by:
authenticatein classAuthorizeProjectStrategy- Parameters:
job- the project to run.item- the item in queue, which will be a build.- Returns:
trueif authentication was successful
-
getCurrentStrategy
ReturnSystemAuthorizationStrategyconfigured in a job.- Parameters:
job- theJob- Returns:
- the
SystemAuthorizationStrategyornull
-
hasJobConfigurePermission
Tests if the job can be reconfigured by the current user when this strategy is the configured strategy. Users withJenkins.ADMINISTERpermission skips this check.- Overrides:
hasJobConfigurePermissionin classAuthorizeProjectStrategy- Parameters:
context- the context of the job- Returns:
trueif and only if the current user is allowed to reconfigure the specified job.
-
hasAuthorizationConfigurePermission
Tests if the authorization can be configured by the current user. Users withJenkins.ADMINISTERpermission skips this check.- Overrides:
hasAuthorizationConfigurePermissionin classAuthorizeProjectStrategy- Parameters:
context- the context of the job- Returns:
trueif and only if the current user is allowed to configure this authorization.
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<AuthorizeProjectStrategy>- Overrides:
getDescriptorin classAuthorizeProjectStrategy
-