Hi Everyone
There is an issue with getting ACL for a document. The method Session.GetAcl
throws DotCMIS.Exceptions.CmisObjectNotFoundException : Unknown object!
Exception stack:
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.ThrowLinkException(String
repositoryId, String id, String rel, String type) in atompub.cs: line 394
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.GetAclInternal(String
repositoryId, String objectId, Nullable`1 onlyBasicPermissions,
IExtensionsData extension) in atompub.cs: line 645
at DotCMIS.Binding.AtomPub.AclService.GetAcl(String repositoryId, String
objectId, Nullable`1 onlyBasicPermissions, IExtensionsData extension) in
atompub.cs: line 2760
at DotCMIS.Client.Impl.Session.GetAcl(IObjectId objectId, Boolean
onlyBasicPermissions) in client-impl.cs: line 869
It happens when ObjectId passed to the Session.GetAcl does not have document
version.
For example
There is a document id -
workspace://SpacesStore/96f5a5ae-aea2-497b-80db-d3f646adb293
If the ID is passed to Session.GetAcl() as
"workspace://SpacesStore/96f5a5ae-aea2-497b-80db-d3f646adb293;1.0" the it
works.
If workspace://SpacesStore/96f5a5ae-aea2-497b-80db-d3f646adb293 then it
doesn't work
I looked into the code and found out that the problem can be in the method
AbstractAtomPubService.GetObjectInternal
The object is requested from Alfresco
HttpUtils.Response resp = Read(url);
AtomEntry entry = Parse<AtomEntry>(resp.Stream);
That is the parameter "url" contains the object id without version number
but response contains ID with version.
In the issue further in GetObjectInternal
AddLink(repositoryId, entry.Id, (AtomLink)element.Object)
Adds the object link with version number but then in the method LoadLink
GetObjectInternal(repositoryId, IdentifierType.Id, id, ReturnVersion.This,
null, null, null, null, null, null, null);
link = GetLink(repositoryId, id, rel, type);
link is null
I think the method should work in spite of the version number is available
or not.
Would you please have a look at the code and do something with it.
Best regards,
Denis Andreev