@ParametersAreNonnullByDefault public class FolderBasedAuthorizationStrategy extends AuthorizationStrategy
| Modifier and Type | Class and Description |
|---|---|
static class |
FolderBasedAuthorizationStrategy.DescriptorImpl |
AuthorizationStrategy.UnsecuredExtensionPoint.LegacyInstancesAreScopedToHudsonLIST, UNSECURED| Constructor and Description |
|---|
FolderBasedAuthorizationStrategy(Set<GlobalRole> globalRoles,
Set<FolderRole> folderRoles,
Set<AgentRole> agentRoles) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFolderRole(AgentRole agentRole)
Adds an
AgentRole to this strategy |
void |
addFolderRole(FolderRole folderRole)
Adds a FolderRole to this strategy
|
void |
addGlobalRole(GlobalRole globalRole) |
void |
assignSidToAgentRole(String roleName,
String sid)
Assigns a SID to a
FolderRole. |
void |
assignSidToFolderRole(String roleName,
String sid)
Assigns a SID to a
FolderRole. |
void |
assignSidToGlobalRole(String roleName,
String sid)
Assigns SID to a
GlobalRole. |
void |
deleteAgentRole(String roleName)
Deletes the
AgentRole identified by its name. |
void |
deleteFolderRole(String roleName)
Deletes the folder role identified by its name.
|
void |
deleteGlobalRole(String roleName)
Deletes the global role identified by its name.
|
SidACL |
getACL(AbstractItem item) |
SidACL |
getACL(Computer computer) |
SidACL |
getACL(Job<?,?> project)
|
Set<AgentRole> |
getAgentRoles() |
Set<FolderRole> |
getFolderRoles()
Returns the
FolderRoles on which this AuthorizationStrategy works. |
Set<GlobalRole> |
getGlobalRoles() |
Collection<String> |
getGroups() |
GlobalAclImpl |
getRootACL() |
protected Object |
readResolve()
Used to initialize transient fields when loaded from disk
|
all, getACL, getACL, getACL, getACL, getACLgetDescriptor@DataBoundConstructor public FolderBasedAuthorizationStrategy(Set<GlobalRole> globalRoles, Set<FolderRole> folderRoles, Set<AgentRole> agentRoles)
@Nonnull public GlobalAclImpl getRootACL()
getRootACL in class AuthorizationStrategy@Nonnull protected Object readResolve()
this@Nonnull public SidACL getACL(@Nonnull Job<?,?> project)
getACL in class AuthorizationStrategyACL for the Job@Nonnull public SidACL getACL(@Nonnull AbstractItem item)
getACL in class AuthorizationStrategy@Nonnull public SidACL getACL(@Nonnull Computer computer)
getACL in class AuthorizationStrategy@Nonnull public Collection<String> getGroups()
getGroups in class AuthorizationStrategypublic void addGlobalRole(@Nonnull GlobalRole globalRole) throws IOException
IOException@Nonnull public Set<GlobalRole> getGlobalRoles()
public void assignSidToGlobalRole(String roleName, String sid) throws IOException
GlobalRole.roleName - the name of the GlobalRolesid - the sid to be assignedIOException - when unable to save the configuration to diskNoSuchElementException - when no GlobalRole with name equal to roleName exists@Nonnull public Set<FolderRole> getFolderRoles()
FolderRoles on which this AuthorizationStrategy works.FolderRoles on which this AuthorizationStrategy workspublic void addFolderRole(@Nonnull FolderRole folderRole) throws IOException
folderRole - the FolderRole to be addedIOException - when unable to save configuration to diskpublic void addFolderRole(@Nonnull AgentRole agentRole) throws IOException
AgentRole to this strategyagentRole - the FolderRole to be addedIOException - when unable to save configuration to diskpublic void assignSidToFolderRole(String roleName, String sid) throws IOException
FolderRole.roleName - the name of the FolderRolesid - the sid to be assignedIOException - when unable to save the configuration to diskNoSuchElementException - when no GlobalRole with name equal to roleName existspublic void assignSidToAgentRole(String roleName, String sid) throws IOException
FolderRole.roleName - the name of the FolderRolesid - the sid to be assignedIOException - when unable to save the configuration to diskNoSuchElementException - when no GlobalRole with name equal to roleName existspublic void deleteGlobalRole(String roleName) throws IOException
roleName - the name of the role to be deletedIOException - when unable to save the configurationNoSuchElementException - when no GlobalRole with name equal to roleName existsIllegalArgumentException - when trying to delete the admin rolepublic void deleteFolderRole(String roleName) throws IOException
roleName - the name of the role to be deletedIOException - when unable to save the configurationNoSuchElementException - when no FolderRole with name equal to roleName existspublic void deleteAgentRole(String roleName) throws IOException
AgentRole identified by its name.roleName - the name of the role to be deletedIOException - when unable to save the configurationNoSuchElementException - when no AgentRole with name equal to roleName existsCopyright © 2016–2019. All rights reserved.