hudson.security
Class AuthorizationMatrixProperty
java.lang.Object
hudson.model.JobProperty<Job<?,?>>
hudson.security.AuthorizationMatrixProperty
- All Implemented Interfaces:
- ExtensionPoint, Describable<JobProperty<?>>, ReconfigurableDescribable<JobProperty<?>>, BuildStep
public class AuthorizationMatrixProperty
- extends JobProperty<Job<?,?>>
JobProperty
to associate ACL for each project.
Once created (and initialized), this object becomes immutable.
Methods inherited from class hudson.model.JobProperty |
getDescriptor, getJobAction, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform, prebuild, reconfigure, setOwner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthorizationMatrixProperty
public AuthorizationMatrixProperty(Map<Permission,Set<String>> grantedPermissions)
getGroups
public Set<String> getGroups()
getAllSIDs
public List<String> getAllSIDs()
- Returns all SIDs configured in this matrix, minus "anonymous"
- Returns:
- Always non-null.
getGrantedPermissions
public Map<Permission,Set<String>> getGrantedPermissions()
- Returns all the (Permission,sid) pairs that are granted, in the multi-map form.
- Returns:
- read-only. never null.
add
protected void add(Permission p,
String sid)
- Adds to
grantedPermissions
. Use of this method should be limited
during construction, as this object itself is considered immutable once
populated.
getACL
public SidACL getACL()
hasPermission
public boolean hasPermission(String sid,
Permission p)
- Checks if the given SID has the given permission.
hasExplicitPermission
public boolean hasExplicitPermission(String sid,
Permission p)
- Checks if the permission is explicitly given, instead of implied through
Permission.impliedBy
.
Copyright © 2004-2013. All Rights Reserved.