hudson.security
Class AuthorizationMatrixProperty

java.lang.Object
  extended by hudson.model.JobProperty<Job<?,?>>
      extended by 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.


Nested Class Summary
static class AuthorizationMatrixProperty.ConverterImpl
          Persist ProjectMatrixAuthorizationStrategy as a list of IDs that represent GlobalMatrixAuthorizationStrategy.grantedPermissions.
static class AuthorizationMatrixProperty.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.JobProperty
owner
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
AuthorizationMatrixProperty(Map<Permission,Set<String>> grantedPermissions)
           
 
Method Summary
protected  void add(Permission p, String sid)
          Adds to grantedPermissions.
 SidACL getACL()
           
 List<String> getAllSIDs()
          Returns all SIDs configured in this matrix, minus "anonymous"
 Map<Permission,Set<String>> getGrantedPermissions()
          Returns all the (Permission,sid) pairs that are granted, in the multi-map form.
 Set<String> getGroups()
           
 boolean hasExplicitPermission(String sid, Permission p)
          Checks if the permission is explicitly given, instead of implied through Permission.impliedBy.
 boolean hasPermission(String sid, Permission p)
          Checks if the given SID has the given permission.
 
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
 

Constructor Detail

AuthorizationMatrixProperty

public AuthorizationMatrixProperty(Map<Permission,Set<String>> grantedPermissions)
Method Detail

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.