public interface Acl
Defines an access control list (ACL) for wiki pages. An Access Control List is a data structure used to guard access to resources. An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type AclEntry, contains a set of positive permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). The ACL Entries in each ACL observe the following rules:
This interface is a highly stripped-down derivation of the java.security.acl.Acl interface. In particular, the notion of an Acl "owner" has been eliminated, since JWPWiki pages do not have owners. An additional simplification compared to the standard Java package is that negative permissions have been eliminated. Instead, JSPWiki assumes a "default-deny" security stance: principals are granted no permissions by default, and posesses only those that have been explicitly granted to them. And finally, the getPermissions() and checkPermission() methods have been eliminated due to the complexities associated with resolving Role principal membership.
Modifier and Type | Method and Description |
---|---|
boolean |
addEntry(AclEntry entry)
Adds an ACL entry to this ACL.
|
Enumeration<AclEntry> |
entries()
Returns an enumeration of the entries in this ACL.
|
Principal[] |
findPrincipals(Permission permission)
Returns all Principal objects assigned a given Permission in the access
control list.
|
AclEntry |
getEntry(Principal principal)
Returns an AclEntry for a supplied Principal, or
null if
the Principal does not have a matching AclEntry. |
boolean |
isEmpty()
Returns
true , if this Acl is empty. |
boolean |
removeEntry(AclEntry entry)
Removes an ACL entry from this ACL.
|
String |
toString()
Returns a string representation of the contents of this Acl.
|
boolean addEntry(AclEntry entry)
entry
- - the ACL entry to be added to this ACLEnumeration<AclEntry> entries()
boolean isEmpty()
true
, if this Acl is empty.Principal[] findPrincipals(Permission permission)
permission
- the permission to search forAclEntry getEntry(Principal principal)
null
if
the Principal does not have a matching AclEntry.principal
- the principal to search fornull
boolean removeEntry(AclEntry entry)
entry
- the ACL entry to be removed from this ACLCopyright © 2001-2019 The Apache Software Foundation. All rights reserved.