Class ChangeControlledRelocationHandler
java.lang.Object
com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler
io.jenkins.plugins.batchcontrol.security.ChangeControlledRelocationHandler
- All Implemented Interfaces:
ExtensionPoint
@Extension(ordinal=10000.0)
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class ChangeControlledRelocationHandler
extends com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler
D-59: puts
MoveGuard in front of every move the folders plugin performs. The plugin's
move/move hands the move to the chain of RelocationHandlers that do not answer
RelocationHandler.HandlingMode.SKIP, highest ordinal first, and the standard handler at the end of that
chain is what calls Items.move. This handler is first in the chain while change control
is on and passes the move on only when the guard allows it; it never offers a destination or
makes the Move action available (RelocationHandler.HandlingMode.DELEGATE). It works whatever authorization
strategy is installed. With change control off it is skipped and moves behave as in Jenkins.
D-59a: when run control is on as well and the mover is not an administrator, every job the
move took along (the item, or every job inside a moved folder) starts over like a new job once
the move has completed (MoveGuard.startOver(hudson.model.Item, java.lang.String, java.lang.String)).
-
Nested Class Summary
Nested classes/interfaces inherited from class com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler
com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler.HandlingModeNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.cloudbees.hudson.plugins.folder.relocate.RelocationHandler.HandlingModeapplicability(Item item) org.kohsuke.stapler.HttpResponsehandle(Item item, ItemGroup<?> destination, AtomicReference<Item> newItem, List<? extends com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler> chain) validDestinations(Item item)
-
Constructor Details
-
ChangeControlledRelocationHandler
public ChangeControlledRelocationHandler()
-
-
Method Details
-
applicability
@NonNull public com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler.HandlingMode applicability(@NonNull Item item) - Specified by:
applicabilityin classcom.cloudbees.hudson.plugins.folder.relocate.RelocationHandler
-
handle
@CheckForNull public org.kohsuke.stapler.HttpResponse handle(@NonNull Item item, @NonNull ItemGroup<?> destination, @NonNull AtomicReference<Item> newItem, @NonNull List<? extends com.cloudbees.hudson.plugins.folder.relocate.RelocationHandler> chain) throws IOException, InterruptedException - Specified by:
handlein classcom.cloudbees.hudson.plugins.folder.relocate.RelocationHandler- Throws:
IOExceptionInterruptedException
-
validDestinations
- Specified by:
validDestinationsin classcom.cloudbees.hudson.plugins.folder.relocate.RelocationHandler
-