Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
There is an issue with ACL applying when a document or folder is being created.
The code below does not work:
IDocument cmisDoc = folder.CreateDocument(properties, contentStream, null, null, cmisAces, null, new OperationContext()
);
cmisDoc.Acl does not contain provided ACEs.
But after that :
cmisDoc.ApplyAcl(cmisAces, null, AclPropagation.RepositoryDetermined);
It does.
I looked into the code and found out that the method DotCMIS.Binding.AtomPub.ObjectService.HandleAclModifications() seems to be working in a wrong way.
The condition in the code below “if (originalAces != null)” is always false. If I comment it then it works.
private void HandleAclModifications(String repositoryId, AtomEntry entry, IAcl addAces, IAcl removeAces)
{
if (!IsAclMergeRequired(addAces, removeAces))
IAcl originalAces = null;
// walk through the entry and find the current ACL
foreach (AtomElement element in entry.GetElements())
{
if (element.Object is cmisObjectType)
}
if (originalAces != null)
{
// merge and update ACL
IAcl newACL = MergeAcls(originalAces, addAces, removeAces);
if (newACL != null)
}
}