public interface BaseAcl
An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type BaseAclEntry, contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied.
The ACL Entries in each ACL observe the following rules:
BaseAclEntry,
com.jinfonet.security.jacl.BaseAcl#getPermissions| Modifier and Type | Method and Description |
|---|---|
boolean |
addBaseEntry(Principal caller,
BaseAclEntry entry)
Adds an ACL entry to this ACL.
|
Iterator<BaseAclEntry> |
baseEntries()
Returns an enumeration of the entries in this ACL.
|
boolean |
checkBasePermission(Principal principal,
BasePermission permission)
Checks whether or not the specified principal has the specified
permission.
|
Iterator<BasePermission> |
getBasePermissions(Principal principal)
Returns an enumeration for the set of allowed permissions for the
specified principal (representing an entity such as an individual or
a group).
|
String |
getName()
Returns the name of this ACL.
|
boolean |
removeBaseEntry(Principal caller,
BaseAclEntry entry)
Removes an ACL entry from this ACL.
|
void |
setAclName(Principal caller,
String name)
Sets the name of this ACL.
|
String |
toString()
Returns a string representation of the
ACL contents.
|
void setAclName(Principal caller, String name) throws WrongOwnerException
caller - the principal invoking this method. It must be an
owner of this ACL.name - the name to be given to this ACL.WrongOwnerException - if the caller principal
is not an owner of this ACL.getName()String getName()
#setNameboolean addBaseEntry(Principal caller, BaseAclEntry entry) throws WrongOwnerException
caller - the principal invoking this method. It must be an
owner of this ACL.entry - the ACL entry to be added to this ACL.WrongOwnerException - if the caller principal
is not an owner of this ACL.boolean removeBaseEntry(Principal caller, BaseAclEntry entry) throws WrongOwnerException
caller - the principal invoking this method. It must be an
owner of this ACL.entry - the ACL entry to be removed from this ACL.WrongOwnerException - if the caller principal is not
an owner of this Acl.Iterator<BasePermission> getBasePermissions(Principal principal)
The individual positive and negative permission sets are also determined. The positive permission set contains the permissions specified in the positive ACL entry (if any) for the principal. Similarly, the negative permission set contains the permissions specified in the negative ACL entry (if any) for the principal. The individual positive (or negative) permission set is considered to be null if there is not a positive (negative) ACL entry for the principal in this ACL.
The set of permissions granted to the principal is then calculated using the simple rule that individual permissions always override the group permissions. That is, the principal's individual negative permission set (specific denial of permissions) overrides the group positive permission set, and the principal's individual positive permission set overrides the group negative permission set.
user - the principal whose permission set is to be returned.Iterator<BaseAclEntry> baseEntries()
boolean checkBasePermission(Principal principal, BasePermission permission)
getPermissions method.principal - the principal, assumed to be a valid authenticated
Principal.permission - the permission to be checked for.#getPermissions© insightsoftware. All rights reserved.