Merged V2.2 to HEAD

7732: Support to cache null QName look ups ...
   7733: Support for store ACLs
   7741: Fix for over keen stiore ACLs ....
   7794: Fix for WCM-1019, tasks show all assets as modified when only one has
   7996: Fix for AWC-1519: cancelling discussion creation results in error


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8448 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-07 01:50:03 +00:00
parent 513a32a71b
commit 6ce34484fc
22 changed files with 838 additions and 129 deletions

View File

@@ -3230,13 +3230,29 @@ public class AVMRepository
if (storeAcl != null)
{
Long storeAclID = storeAcl.getId();
context.getAdditionalContext().put("STORE_ACL_ID", storeAclID);
context.setStoreAcl(storeAclID);
}
}
return fPermissionService.hasPermission(aclId, context, permission)
== AccessStatus.ALLOWED;
}
public boolean can(String storeName, int version, String path, String permission)
{
Lookup lookup = AVMRepository.GetInstance().lookup(version, path, true);
if (lookup != null)
{
AVMNode node = lookup.getCurrentNode();
AVMStore store = getAVMStoreByName(storeName);
return can(store, node, permission);
}
else
{
// Does not exist => allowed
return true;
}
}
/**
* Set the acl on a store.
* @param storeName