Breaking up some long lines to facilitate debugging.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2318 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-08 14:48:57 +00:00
parent cc503b2ac8
commit 1c0c31e10e
2 changed files with 11 additions and 4 deletions

View File

@@ -85,7 +85,9 @@ public class PermissionDataPatch extends AbstractPatch
ref.setName(name);
// it acts as its own key
PermissionReference found = (PermissionReference) getHibernateTemplate().get(PermissionReferenceImpl.class, ref);
PermissionReference found = (PermissionReference) getHibernateTemplate().get(
PermissionReferenceImpl.class,
ref);
if (found == null)
{

View File

@@ -56,8 +56,9 @@ import org.springframework.beans.factory.InitializingBean;
*/
public class PermissionServiceImpl implements PermissionServiceSPI, InitializingBean
{
static SimplePermissionReference OLD_ALL_PERMISSIONS_REFERENCE = new SimplePermissionReference(QName.createQName(
NamespaceService.SECURITY_MODEL_1_0_URI, PermissionService.ALL_PERMISSIONS), PermissionService.ALL_PERMISSIONS);
static SimplePermissionReference OLD_ALL_PERMISSIONS_REFERENCE = new SimplePermissionReference(
QName.createQName(NamespaceService.SECURITY_MODEL_1_0_URI, PermissionService.ALL_PERMISSIONS),
PermissionService.ALL_PERMISSIONS);
private static Log log = LogFactory.getLog(PermissionServiceImpl.class);
@@ -381,7 +382,11 @@ public class PermissionServiceImpl implements PermissionServiceSPI, Initializing
QName typeQname = nodeService.getType(nodeRef);
Set<QName> aspectQNames = nodeService.getAspects(nodeRef);
NodeTest nt = new NodeTest(perm.equals(OLD_ALL_PERMISSIONS_REFERENCE) ? getAllPermissionReference() : perm, typeQname, aspectQNames);
if (perm.equals(OLD_ALL_PERMISSIONS_REFERENCE))
{
perm = getAllPermissionReference();
}
NodeTest nt = new NodeTest(perm, typeQname, aspectQNames);
boolean result = nt.evaluate(authorisations, nodeRef);
if (log.isDebugEnabled())
{