public class DefaultAclManager extends java.lang.Object implements AclManager
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
ACL_PATTERN
Identifies ACL strings in wiki text; the first group is the action (view, edit) and
the second is the list of Principals separated by commas.
|
| Constructor and Description |
|---|
DefaultAclManager() |
| Modifier and Type | Method and Description |
|---|---|
Acl |
getPermissions(Page page)
Returns the access control list for the page.
|
void |
initialize(Engine engine,
java.util.Properties props) |
Acl |
parseAcl(Page page,
java.lang.String ruleLine)
A helper method for parsing textual AccessControlLists.
|
protected static java.lang.String |
printAcl(Acl acl)
Generates an ACL string for inclusion in a wiki page, based on a supplied Acl object.
|
void |
setPermissions(Page page,
Acl acl)
Sets the access control list for the page and persists it.
|
public static final java.util.regex.Pattern ACL_PATTERN
public DefaultAclManager()
public void initialize(Engine engine, java.util.Properties props)
initialize in interface Initializablepublic Acl parseAcl(Page page, java.lang.String ruleLine) throws WikiSecurityException
parseAcl in interface AclManagerpage - The current wiki page. If the page already has an ACL, it will be used as a basis for this ACL in order to avoid the
creation of a new one.ruleLine - The rule line, as described above.WikiSecurityException - if the ruleLine was faulty somehow.public Acl getPermissions(Page page)
getPermissions in interface AclManagerpage - the wiki pagepublic void setPermissions(Page page, Acl acl) throws WikiSecurityException
setPermissions in interface AclManagerpage - the wiki pageacl - the access control listWikiSecurityException - if the ACL cannot be set or persistedprotected static java.lang.String printAcl(Acl acl)
acl - the ACLCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.