@ParametersAreNonnullByDefault public class FolderAuthorizationStrategyAPI extends Object
FolderBasedAuthorizationStrategy.
These methods should only be called when Jenkins.getAuthorizationStrategy()} is
FolderBasedAuthorizationStrategy. This class does not provide REST API methods.
for REST API methods.| Modifier and Type | Method and Description |
|---|---|
static void |
addAgentRole(AgentRole role)
Adds an
AgentRole to the FolderBasedAuthorizationStrategy. |
static void |
addFolderRole(FolderRole role)
Adds a
FolderRole to the FolderBasedAuthorizationStrategy. |
static void |
addGlobalRole(GlobalRole role)
Adds a
GlobalRole to the FolderBasedAuthorizationStrategy. |
static void |
assignSidToAgentRole(String sid,
String roleName)
|
static void |
assignSidToFolderRole(String sid,
String roleName)
|
static void |
assignSidToGlobalRole(String sid,
String roleName)
|
static void |
deleteAgentRole(String roleName)
Deletes the
AgentRole with name equal to roleName. |
static void |
deleteFolderRole(String roleName)
Deletes the
FolderRole with name equal to roleName. |
static void |
deleteGlobalRole(String roleName)
Deletes the
GlobalRole with name equal to roleName. |
public static void addGlobalRole(GlobalRole role)
GlobalRole to the FolderBasedAuthorizationStrategy.role - the role to be added.IllegalArgumentException - when a role with the given name already exists.public static void addFolderRole(FolderRole role)
FolderRole to the FolderBasedAuthorizationStrategy.role - the role to be added.IllegalArgumentException - when a role with the given name already exists.public static void addAgentRole(AgentRole role)
AgentRole to the FolderBasedAuthorizationStrategy.role - the role to be added.IllegalArgumentException - when a role with the given name already exists.public static void assignSidToGlobalRole(String sid, String roleName)
sid - this sid will be assigned to the global role with the name equal to roleName.roleName - the name of the global roleIllegalArgumentException - when no global role with name equal to roleName existsIllegalArgumentException - when the sid is emptypublic static void assignSidToAgentRole(String sid, String roleName)
sid - this sid will be assigned to the AgentRole with the name equal to roleName.roleName - the name of the agent roleIllegalArgumentException - when no agent role with name equal to roleName existsIllegalArgumentException - when the sid is emptypublic static void assignSidToFolderRole(String sid, String roleName)
sid - this sid will be assigned to the FolderRole with the name equal to roleName.roleName - the name of the folder roleIllegalArgumentException - when no folder role with name equal to roleName existsIllegalArgumentException - when the sid is emptypublic static void deleteGlobalRole(String roleName)
GlobalRole with name equal to roleName.roleName - the name of the role to be deletedIllegalArgumentException - when no global role with name equal to roleName existspublic static void deleteFolderRole(String roleName)
FolderRole with name equal to roleName.roleName - the name of the role to be deletedIllegalArgumentException - when no role with name equal to roleName existspublic static void deleteAgentRole(String roleName)
AgentRole with name equal to roleName.roleName - the name of the role to be deletedIllegalArgumentException - when no role with name equal to roleName existsCopyright © 2016–2019. All rights reserved.