public class LockSecurityPolicy extends AbstractSecurityPolicy
SecurityPolicy.IdentityQueryTransformer, SecurityPolicy.QueryTransformer
Constructor and Description |
---|
LockSecurityPolicy() |
Modifier and Type | Method and Description |
---|---|
Access |
checkPermission(Document doc,
ACP mergedAcp,
Principal principal,
String permission,
String[] resolvedPermissions,
String[] additionalPrincipals)
Checks given permission for doc and principal.
|
SQLQuery.Transformer |
getQueryTransformer()
Legacy method for compatibility, use
AbstractSecurityPolicy.getQueryTransformer(String) instead |
boolean |
isExpressibleInQuery()
Legacy method for compatibility, use
AbstractSecurityPolicy.isExpressibleInQuery(String) instead |
boolean |
isRestrictingPermission(String permission)
Checks if this policy is restricting the given permission.
|
getQueryTransformer, getQueryTransformer, isExpressibleInQuery, isExpressibleInQuery
public Access checkPermission(Document doc, ACP mergedAcp, Principal principal, String permission, String[] resolvedPermissions, String[] additionalPrincipals)
SecurityPolicy
Note that for the Browse
permission, which is also implemented in SQL using SecurityPolicy.getQueryTransformer(java.lang.String)
,
a security policy must never bypass standard ACL access, it must only return DENY or UNKNOWN. Failing to do this
would make direct access and queries behave differently.
doc
- the document to checkmergedAcp
- merged ACP resolved for this documentprincipal
- principal to checkpermission
- permission to checkresolvedPermissions
- permissions or groups of permissions containing permissionpublic boolean isRestrictingPermission(String permission)
SecurityPolicy
Queries check the BROWSE permission.
isRestrictingPermission
in interface SecurityPolicy
isRestrictingPermission
in class AbstractSecurityPolicy
permission
- the permission to check fortrue
if the policy restricts the permissionpublic boolean isExpressibleInQuery()
AbstractSecurityPolicy
AbstractSecurityPolicy.isExpressibleInQuery(String)
insteadisExpressibleInQuery
in class AbstractSecurityPolicy
public SQLQuery.Transformer getQueryTransformer()
AbstractSecurityPolicy
AbstractSecurityPolicy.getQueryTransformer(String)
insteadgetQueryTransformer
in class AbstractSecurityPolicy
Copyright © 2015 Nuxeo SA. All rights reserved.