public class CrafterPageAccessManager extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
authorizedRolesXPathQuery |
Constructor and Description |
---|
CrafterPageAccessManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkAccess(SiteItem page)
Checks if the user has sufficient rights to access the specified page:
If the page doesn't contain any required role, no authentication is needed.
If the page has the role "Anonymous", no authentication is needed.
If the page has the role "Authenticated", just authentication is needed.
If the page has any other the roles, the user needs to have any of those roles.
|
protected boolean |
containsRole(String role,
List<String> roles) |
protected List<String> |
getAuthorizedRolesForPage(SiteItem page) |
protected boolean |
hasAnyRole(org.springframework.security.core.Authentication auth,
List<String> roles) |
void |
setAuthorizedRolesXPathQuery(String authorizedRolesXPathQuery) |
protected String authorizedRolesXPathQuery
public void setAuthorizedRolesXPathQuery(String authorizedRolesXPathQuery)
public void checkAccess(SiteItem page)
Copyright © 2021 CrafterCMS. All rights reserved.