hudson.security
Class ProjectMatrixAuthorizationStrategy

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<AuthorizationStrategy>
      extended by hudson.security.AuthorizationStrategy
          extended by hudson.security.GlobalMatrixAuthorizationStrategy
              extended by hudson.security.ProjectMatrixAuthorizationStrategy
All Implemented Interfaces:
ExtensionPoint, Describable<AuthorizationStrategy>

public class ProjectMatrixAuthorizationStrategy
extends GlobalMatrixAuthorizationStrategy

GlobalMatrixAuthorizationStrategy plus per-project ACL.

Per-project ACL is stored in AuthorizationMatrixProperty.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class ProjectMatrixAuthorizationStrategy.ConverterImpl
           
 
Nested classes/interfaces inherited from class hudson.security.GlobalMatrixAuthorizationStrategy
GlobalMatrixAuthorizationStrategy.DescriptorImpl
 
Nested classes/interfaces inherited from class hudson.security.AuthorizationStrategy
AuthorizationStrategy.Unsecured
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static Descriptor<AuthorizationStrategy> DESCRIPTOR
           
 
Fields inherited from class hudson.security.AuthorizationStrategy
LIST, UNSECURED
 
Constructor Summary
ProjectMatrixAuthorizationStrategy()
           
 
Method Summary
 SidACL getACL(AbstractItem item)
          Implementation can choose to provide different ACL for different items.
 SidACL getACL(ItemGroup g)
           
 ACL getACL(Job<?,?> project)
           
 Set<String> getGroups()
          Returns the list of all group/role names used in this authorization strategy, and the ACL returned from the AuthorizationStrategy.getRootACL() method.
 
Methods inherited from class hudson.security.GlobalMatrixAuthorizationStrategy
add, getAllSIDs, getRootACL, hasExplicitPermission, hasPermission
 
Methods inherited from class hudson.security.AuthorizationStrategy
all, getACL, getACL, getACL, getACL, getACL, getACL
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTOR

@Extension
public static final Descriptor<AuthorizationStrategy> DESCRIPTOR
Constructor Detail

ProjectMatrixAuthorizationStrategy

public ProjectMatrixAuthorizationStrategy()
Method Detail

getACL

public ACL getACL(Job<?,?> project)
Overrides:
getACL in class AuthorizationStrategy

getACL

public SidACL getACL(ItemGroup g)

getACL

public SidACL getACL(AbstractItem item)
Description copied from class: AuthorizationStrategy
Implementation can choose to provide different ACL for different items. This can be used as a basis for more fine-grained access control.

The default implementation returns AuthorizationStrategy.getRootACL().

Overrides:
getACL in class AuthorizationStrategy

getGroups

public Set<String> getGroups()
Description copied from class: AuthorizationStrategy
Returns the list of all group/role names used in this authorization strategy, and the ACL returned from the AuthorizationStrategy.getRootACL() method.

This method is used by ContainerAuthentication to work around the servlet API issue that prevents us from enumerating roles that the user has.

If such enumeration is impossible, do the best to list as many as possible, then return it. In the worst case, just return an empty list. Doing so would prevent users from using role names as group names (see HUDSON-2716 for such one such report.)

Overrides:
getGroups in class GlobalMatrixAuthorizationStrategy
Returns:
never null.


Copyright © 2004-2013. All Rights Reserved.