chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Romanyuk" <vroman...@elilink.com>
Subject Parsing exception when applying ACL
Date Mon, 05 Mar 2012 16:15:02 GMT
Hi.
Please, help me with the following issue.
I'm using Alfresco 4.0 and developing .Net application that uses DotCMIS
library. 

Existing Access Control List(ACL) that is applied to the particular folder
is returned fine. The issue appeared when I tried to apply new ACL to a
folder. When I tried it threw "Parsing exception!" exception.

 Here are my C# code lines:

IOperationContext operationContext = Session.CreateOperationContext();
            operationContext.IncludeAcls = true;
            Dictionary<String, object> newFolderProps = new
Dictionary<String, object>();
            newFolderProps.Add(PropertyIds.ObjectTypeId, "cmis:folder");
            newFolderProps.Add(PropertyIds.Name, "ADGFolderPermissions");
            IList<IAce> acl = new List<IAce>();
            var newAce =(Ace) Session.ObjectFactory.CreateAce("admin", new
List<string>() { "cmis:write" });
            acl.Add(newAce);
            Folder folderAssociations =
(Folder)Session.GetRootFolder().CreateFolder(newFolderProps, null, acl,
null, operationContext );
            
            var createdFolderwithOC = (Folder)
Session.GetObject(folderAssociations.Id, operationContext);

            createdFolderwithOC.AddAcl(acl, AclPropagation.ObjectOnly);



Last line causes exception "Parsing exception!". What am I doing wrong?
Does anyone have suggestions on that?

 

Thank you.

Regards, Victor


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message