Constructor and Description |
---|
RoleMap(SortedMap<Role,Set<String>> grantedRoles)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRole(Role role)
Add the given role to this
RoleMap . |
void |
assignRole(Role role,
String sid)
Assign the sid to the given
Role . |
void |
clearSids()
|
void |
clearSidsForRole(Role role)
Clear all the sids associated to the given
Role . |
void |
deleteRoleSid(String sid,
String rolename)
Clear specific role associated to the given sid
|
void |
deleteSids(String sid)
Clear all the roles associated to the given sid
|
hudson.security.SidACL |
getACL(RoleType roleType,
hudson.security.AccessControlled controlledItem)
Get the ACL for the current
RoleMap . |
SortedMap<Role,Set<String>> |
getGrantedRoles()
Get an unmodifiable sorted map containing
Role s and their assigned sids. |
Role |
getRole(String name)
Get the
Role object named after the given param. |
Set<Role> |
getRoles()
|
SortedSet<String> |
getSids()
Get all the sids referenced in this
RoleMap , minus the Anonymous sid. |
SortedSet<String> |
getSids(Boolean includeAnonymous)
Get all the sids referenced in this
RoleMap . |
Set<String> |
getSidsForRole(String roleName)
Get all the sids assigned to the
Role named after the roleName param. |
boolean |
hasRole(Role role)
|
RoleMap |
newMatchingRoleMap(String namePattern)
|
void |
removeRole(Role role)
Removes a
Role |
void |
unAssignRole(Role role,
String sid)
unAssign the sid to the given
Role . |
public boolean hasRole(@Nonnull Role role)
role
- Role to be checkedtrue
if the RoleMap
contains the given rolepublic hudson.security.SidACL getACL(RoleType roleType, hudson.security.AccessControlled controlledItem)
RoleMap
.RoleMap
public void addRole(Role role)
RoleMap
.role
- The Role
to addpublic void assignRole(Role role, String sid)
Role
.role
- The Role
to assign the sid tosid
- The sid to assignpublic void unAssignRole(Role role, String sid)
Role
.role
- The Role
to unassign the sid tosid
- The sid to assignpublic void clearSidsForRole(Role role)
Role
.role
- The Role
for which you want to clear the sidspublic void deleteSids(String sid)
sid
- The sid for thwich you want to clear the Role
spublic void deleteRoleSid(String sid, String rolename)
public void clearSids()
@CheckForNull public Role getRole(String name)
Role
object named after the given param.public void removeRole(Role role)
Role
role
- The Role
which shall be removedpublic SortedMap<Role,Set<String>> getGrantedRoles()
Role
s and their assigned sids.Role
s and their associated sidspublic SortedSet<String> getSids()
RoleMap
, minus the Anonymous
sid.Anonymous
sidpublic SortedSet<String> getSids(Boolean includeAnonymous)
RoleMap
.includeAnonymous
- True if you want the Anonymous
sid to be included in the set@CheckForNull public Set<String> getSidsForRole(String roleName)
Role
named after the roleName
param.roleName
- The name of the rolenull
if the role is missing.Copyright © 2016–2018. All rights reserved.