mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user