Package hudson.security
Class SparseACL
- java.lang.Object
-
- hudson.security.ACL
-
- hudson.security.SidACL
-
- hudson.security.SparseACL
-
public class SparseACL extends SidACL
Access control list.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SparseACL.Entry
-
Field Summary
-
Fields inherited from class hudson.security.ACL
ANONYMOUS, ANONYMOUS_USERNAME, EVERYONE, SYSTEM, SYSTEM_USERNAME, SYSTEM2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SparseACL.Entry e)
void
add(Sid sid, Permission permission, boolean allowed)
protected Boolean
hasPermission(Sid p, Permission permission)
Checks if the givenSid
has the givenPermission
.boolean
hasPermission2(org.springframework.security.core.Authentication a, Permission permission)
Checks if the given principle has the given permission.-
Methods inherited from class hudson.security.SidACL
_hasPermission, newInheritingACL, toString
-
Methods inherited from class hudson.security.ACL
as, as, as2, checkAnyPermission, checkCreatePermission, checkCreatePermission, checkPermission, hasAnyPermission, hasCreatePermission, hasCreatePermission, hasCreatePermission2, hasCreatePermission2, hasPermission, hasPermission, impersonate, impersonate, impersonate, impersonate2, impersonate2, impersonate2, isAnonymous, isAnonymous2, lambda, lambda2
-
-
-
-
Constructor Detail
-
SparseACL
public SparseACL(ACL parent)
-
-
Method Detail
-
add
public void add(SparseACL.Entry e)
-
add
public void add(Sid sid, Permission permission, boolean allowed)
-
hasPermission2
public boolean hasPermission2(org.springframework.security.core.Authentication a, Permission permission)
Description copied from class:ACL
Checks if the given principle has the given permission.Note that
ACL.SYSTEM2
can be passed in as the authentication parameter, in which case you should probably just assume it has every permission.- Overrides:
hasPermission2
in classSidACL
-
hasPermission
protected Boolean hasPermission(Sid p, Permission permission)
Description copied from class:SidACL
Checks if the givenSid
has the givenPermission
.SidACL.hasPermission2(Authentication, Permission)
is implemented by checking authentication'sGrantedAuthority
by using this method.It is the implementor's responsibility to recognize
Permission.impliedBy
and take that into account.- Specified by:
hasPermission
in classSidACL
- 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—such as consulting the higher level ACL, or denying the access (if the model is no-access-by-default.)
-
-