Class StrategyMigration
java.lang.Object
io.jenkins.plugins.batchcontrol.security.StrategyMigration
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class StrategyMigration
extends Object
Copies between a plain supported strategy and its Batch Control subclass (D-35a, D-35d): the
migration action and its reverse. Both are explicit administrator actions; nothing is converted
when a configuration is loaded (D-35e removed the withdrawn wrapper and its load conversion).
matrix-auth and role-strategy are optional, and either or both may be missing (S-03). This
class refers to core types only. Strategies are recognised by class name, the plugin is checked
to be installed, and only then is the per-plugin holder (MatrixStrategies or
RoleStrategies) called. Those holders return core types, so verifying this class never
loads a class of either plugin.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisMigratable(AuthorizationStrategy strategy) Whetherstrategyis exactly one of the plain strategies the migration action copies: matrix-auth's project matrix or global matrix, or role-strategy's class.static booleanisPerItemWidening(AuthorizationStrategy strategy) Whether migratingstrategymakes per-item authorization properties effective (S-04, D-35d): matrix-auth's global matrix ignores job, folder and agent properties, and the Batch Control matrix is project-based, so stale properties would start to count and native Item/Configure holders could edit item ACLs.static AuthorizationStrategytoBatchControl(AuthorizationStrategy strategy) The Batch Control subclass with every entry ofstrategy, ornullwhenisMigratable(hudson.security.AuthorizationStrategy)is false or the plugin is not installed.static AuthorizationStrategytoPlain(AuthorizationStrategy strategy) The plain parent strategy with every entry of a Batch Controlstrategy, ornullif it is not one.
-
Method Details
-
isMigratable
Whetherstrategyis exactly one of the plain strategies the migration action copies: matrix-auth's project matrix or global matrix, or role-strategy's class. Subclasses by other plugins are not copied: their extra state would be lost. -
isPerItemWidening
Whether migratingstrategymakes per-item authorization properties effective (S-04, D-35d): matrix-auth's global matrix ignores job, folder and agent properties, and the Batch Control matrix is project-based, so stale properties would start to count and native Item/Configure holders could edit item ACLs. -
toBatchControl
@CheckForNull public static AuthorizationStrategy toBatchControl(@CheckForNull AuthorizationStrategy strategy) The Batch Control subclass with every entry ofstrategy, ornullwhenisMigratable(hudson.security.AuthorizationStrategy)is false or the plugin is not installed. The argument is not modified. An explicit administrator action (the monitor's migration button); for the global matrix seeisPerItemWidening(hudson.security.AuthorizationStrategy). -
toPlain
@CheckForNull public static AuthorizationStrategy toPlain(@CheckForNull AuthorizationStrategy strategy) The plain parent strategy with every entry of a Batch Controlstrategy, ornullif it is not one.
-