public abstract class AuthorizeProjectStrategy extends AbstractDescribableImpl<AuthorizeProjectStrategy> implements ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
AuthorizeProjectStrategy() |
Modifier and Type | Method and Description |
---|---|
static DescriptorExtensionList<AuthorizeProjectStrategy,Descriptor<AuthorizeProjectStrategy>> |
all() |
Authentication |
authenticate(AbstractProject<?,?> project,
Queue.Item item)
Deprecated.
use
authenticate(hudson.model.Job, Queue.Item) instead. |
Authentication |
authenticate(Job<?,?> project,
Queue.Item item)
Returns the
Authentication for the build. |
void |
checkAuthorizationConfigurePermission(AccessControlled context)
Checks that the authorization can be configured by the current user.
|
void |
checkJobConfigurePermission(AccessControlled context)
Checks that the job can be reconfigured by the current user when this strategy is the configured strategy.
|
AuthorizeProjectStrategyDescriptor |
getDescriptor() |
boolean |
hasAuthorizationConfigurePermission(AccessControlled context)
Tests if the authorization can be configured by the current user.
|
boolean |
hasJobConfigurePermission(AccessControlled context)
Tests if the job can be reconfigured by the current user when this strategy is the configured strategy.
|
protected Object |
readResolve()
If we are being deserialized outside of loading the initial jobs (or reloading) then we need to cross check
the strategy permissions to defend against somebody trying to push a configuration relating to a user other
than themselves.
|
public static DescriptorExtensionList<AuthorizeProjectStrategy,Descriptor<AuthorizeProjectStrategy>> all()
AuthorizeProjectStrategy
.public Authentication authenticate(Job<?,?> project, Queue.Item item)
Authentication
for the build.project
- the project to run.item
- the item in queue, which will be a build.true
if authentication was successful@Deprecated public Authentication authenticate(AbstractProject<?,?> project, Queue.Item item)
authenticate(hudson.model.Job, Queue.Item)
instead.AbstractProject
based version of authenticate(Job, Queue.Item)
.project
- the project to run.item
- the item in queue, which will be a build.true
if authentication was successfulpublic AuthorizeProjectStrategyDescriptor getDescriptor()
getDescriptor
in interface Describable<AuthorizeProjectStrategy>
getDescriptor
in class AbstractDescribableImpl<AuthorizeProjectStrategy>
public final void checkJobConfigurePermission(AccessControlled context)
context
- the context of the jobAccessDeniedException
- if the current user is not allowed to reconfigure the specified jobpublic boolean hasJobConfigurePermission(AccessControlled context)
Jenkins.ADMINISTER
permission skips this check.context
- the context of the jobtrue
if and only if the current user is allowed to reconfigure the specified job.public final void checkAuthorizationConfigurePermission(AccessControlled context)
context
- the context of the jobAccessDeniedException
- if the current user is not allowed to configure this authorizationpublic boolean hasAuthorizationConfigurePermission(AccessControlled context)
Jenkins.ADMINISTER
permission skips this check.context
- the context of the jobtrue
if and only if the current user is allowed to configure this authorization.protected Object readResolve() throws ObjectStreamException
this
ObjectStreamException
- if the object cannot be deserialized.AuthorizeProjectProperty.setStrategyCritical()
Copyright © 2016–2021. All rights reserved.