hudson.security
Class SparseACL

java.lang.Object
  extended by hudson.security.ACL
      extended by hudson.security.SidACL
          extended by hudson.security.SparseACL

public class SparseACL
extends SidACL

Access control list.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class SparseACL.Entry
           
 
Field Summary
 
Fields inherited from class hudson.security.ACL
ANONYMOUS, AUTOMATIC_SIDS, EVERYONE, SYSTEM
 
Constructor Summary
SparseACL(ACL parent)
           
 
Method Summary
 void add(org.acegisecurity.acls.sid.Sid sid, Permission permission, boolean allowed)
           
 void add(SparseACL.Entry e)
           
 boolean hasPermission(org.acegisecurity.Authentication a, Permission permission)
          Checks if the given principle has the given permission.
protected  Boolean hasPermission(org.acegisecurity.acls.sid.Sid p, Permission permission)
          Checks if the given Sid has the given Permission.
 
Methods inherited from class hudson.security.SidACL
_hasPermission, newInheritingACL, toString
 
Methods inherited from class hudson.security.ACL
checkPermission, hasPermission, impersonate, impersonate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparseACL

public SparseACL(ACL parent)
Method Detail

add

public void add(SparseACL.Entry e)

add

public void add(org.acegisecurity.acls.sid.Sid sid,
                Permission permission,
                boolean allowed)

hasPermission

public boolean hasPermission(org.acegisecurity.Authentication a,
                             Permission permission)
Description copied from class: ACL
Checks if the given principle has the given permission.

Note that ACL.SYSTEM can be passed in as the authentication parameter, in which case you should probably just assume it has every permission.

Overrides:
hasPermission in class SidACL

hasPermission

protected Boolean hasPermission(org.acegisecurity.acls.sid.Sid p,
                                Permission permission)
Description copied from class: SidACL
Checks if the given Sid has the given Permission.

SidACL.hasPermission(Authentication, Permission) is implemented by checking authentication's GrantedAuthority by using this method.

It is the implementor's responsibility to recognize Permission.impliedBy and take that into account.

Specified by:
hasPermission in class SidACL
Returns:
true if the access should be granted, false if it should be denied. The null value indicates that the ACL does no rule for this Sid/Permission combination. The caller can decide what to do &mash; such as consulting the higher level ACL, or denying the access (if the model is no-access-by-default.)


Copyright © 2004-2013. All Rights Reserved.