org.nuxeo.ecm.core.storage.sql.coremodel
Class SQLSecurityManager
java.lang.Object
org.nuxeo.ecm.core.storage.sql.coremodel.SQLSecurityManager
- All Implemented Interfaces:
- SecurityManager
public class SQLSecurityManager
- extends Object
- implements SecurityManager
- Author:
- Florent Guillaume
SQLSecurityManager
public SQLSecurityManager()
getACP
public ACP getACP(Document doc)
throws SecurityException
- Specified by:
getACP
in interface SecurityManager
- Throws:
SecurityException
setACP
public void setACP(Document doc,
ACP acp,
boolean overwrite)
throws SecurityException
- Specified by:
setACP
in interface SecurityManager
- Throws:
SecurityException
getMergedACP
public ACP getMergedACP(Document doc)
throws SecurityException
- Specified by:
getMergedACP
in interface SecurityManager
- Throws:
SecurityException
checkPermission
public boolean checkPermission(Document doc,
String username,
String permission)
throws SecurityException
- Description copied from interface:
SecurityManager
- Checks whether this ACP grant the given permission on the given user.
The merged ACP is checked (this means all parents ACP + the local one)
but this doesn't check user groups or permission groups.
If the ACP is not explicitly denying or granting the permission false is returned
(the default behavior is to deny).
- Specified by:
checkPermission
in interface SecurityManager
- Parameters:
doc
- the documentusername
- the user namepermission
- the permission to check
- Returns:
- true if granted, false if denied
- Throws:
SecurityException
getAccess
public Access getAccess(Document doc,
String username,
String permission)
throws SecurityException
- Description copied from interface:
SecurityManager
- Checks whether this ACP grant the given permission on the given user, denies it or
doesn't specify a rule.
- Specified by:
getAccess
in interface SecurityManager
- Parameters:
doc
- the documentusername
- the user namepermission
- the permission to check
- Returns:
- Access.GRANT if granted, Access.DENY if denied or Access.UNKNOWN if no rule for that permission exists.
Never return null
- Throws:
SecurityException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.