info.magnolia.cms.core
Class DefaultACLBasedPermissions
java.lang.Object
org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
info.magnolia.cms.core.DefaultACLBasedPermissions
- All Implemented Interfaces:
- org.apache.jackrabbit.core.security.authorization.CompiledPermissions
- Direct Known Subclasses:
- NodeTypeBasedPermissions, RootOnlyPermissions
public class DefaultACLBasedPermissions
- extends org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Permission based on user ACL for given workspace. Caches the result of resolving paths from ids, the caching
implementation based org.apache.jackrabbit.core.security.authorization.principalbased.ACLProvider.CompiledPermissionImpl
.
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions |
org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result |
Fields inherited from interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions |
NO_PERMISSION |
Method Summary |
protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result |
buildRepositoryResult()
|
protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result |
buildResult(org.apache.jackrabbit.spi.Path absPath)
|
boolean |
canRead(org.apache.jackrabbit.spi.Path itemPath,
org.apache.jackrabbit.core.id.ItemId itemId)
|
protected long |
convertJackrabbitPermissionsToMagnoliaPermissions(long jackRabbitPermissions)
|
protected org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl |
getPrivilegeManagerImpl()
|
int |
getPrivileges(org.apache.jackrabbit.spi.Path absPath)
|
org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result |
getResult(org.apache.jackrabbit.spi.Path absPath)
|
boolean |
grants(org.apache.jackrabbit.spi.Path absPath,
int permissions)
|
Methods inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions |
canReadAll, clearCache, close, getPrivilegeSet, hasPrivileges |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ami
protected final AccessManager ami
readCache
protected final Map<org.apache.jackrabbit.core.id.ItemId,Boolean> readCache
monitor
protected final Object monitor
session
protected org.apache.jackrabbit.core.SessionImpl session
permissionMapping
protected final long[][] permissionMapping
pathResolver
protected final org.apache.jackrabbit.spi.commons.conversion.PathResolver pathResolver
- Used to convert a jackrabbit Path abstraction into a path string with slashes and namespaces.
DefaultACLBasedPermissions
public DefaultACLBasedPermissions(List<Permission> permissions,
org.apache.jackrabbit.core.SessionImpl systemSession,
Map<?,?> configuration)
convertJackrabbitPermissionsToMagnoliaPermissions
protected long convertJackrabbitPermissionsToMagnoliaPermissions(long jackRabbitPermissions)
canRead
public boolean canRead(org.apache.jackrabbit.spi.Path itemPath,
org.apache.jackrabbit.core.id.ItemId itemId)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
buildResult
protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildResult(org.apache.jackrabbit.spi.Path absPath)
throws javax.jcr.RepositoryException
- Specified by:
buildResult
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
getResult
public org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result getResult(org.apache.jackrabbit.spi.Path absPath)
throws javax.jcr.RepositoryException
- Overrides:
getResult
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
grants
public boolean grants(org.apache.jackrabbit.spi.Path absPath,
int permissions)
throws javax.jcr.RepositoryException
- Specified by:
grants
in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
- Overrides:
grants
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
getPrivileges
public int getPrivileges(org.apache.jackrabbit.spi.Path absPath)
throws javax.jcr.RepositoryException
- Specified by:
getPrivileges
in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
- Overrides:
getPrivileges
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
buildRepositoryResult
protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildRepositoryResult()
throws javax.jcr.RepositoryException
- Specified by:
buildRepositoryResult
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
getPrivilegeManagerImpl
protected org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl getPrivilegeManagerImpl()
throws javax.jcr.RepositoryException
- Specified by:
getPrivilegeManagerImpl
in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
- Throws:
javax.jcr.RepositoryException
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.