Copy Folder ACLs - Enable/Disable Security Override

Copy Folder ACLs - Enable/Disable Security Override

Anonymous
Not applicable
1,626 Views
2 Replies
Message 1 of 3

Copy Folder ACLs - Enable/Disable Security Override

Anonymous
Not applicable

 

Hi,

 

I have a question about setting the 'Security Override' option of folders in Vault.
Is it possible to enable/disable this using the Vault API?

 

I want to use this on a project to copy folders in Vault and also the Folder ACLs (see attachment).

Creating the folders and copying the Folder ACLs i have already working using the following statements:

 

WebServiceManager.DocumentService.AddFolder(TargetFolder)
WebServiceManager.SecurityService.GetACLsByEntityIds(SourceFolder)
WebServiceManager.SecurityService.UpdateACL(TargetFolder)

 

I only need to set the 'Security Override' option now programmatically.

Any suggestions?

 

I'am using Vault Proffesional 2012, build 17.1.16.0 and Visual C# 2010 SP1

 

Kind regards, Frank

0 Likes
Accepted solutions (1)
1,627 Views
2 Replies
Replies (2)
Message 2 of 3

wayne.brill
Collaborator
Collaborator
Accepted solution

Hi Frank,

 

Take a look at the suggestion in this blog post. It discusses setting security on a file and in my limited testing it works for a folder also: 

http://adndevblog.typepad.com/manufacturing/2013/02/vault-use-setsystemacls-to-set-permissions-on-fi...

 

Here is the code I added to that example:

 

...

   

ACL myAcl = m_serviceManager.

          SecurityService.AddSystemACL(aces);

         

           

//wb testing not in blog post

           

Folder[] fldrArray = m_serviceManager.DocumentService.GetFoldersByFileMasterId(myFiles[0].MasterId);

           

Folder myFolder = fldrArray[0];

            m_serviceManager.SecurityService.

                   SetSystemACLs(

newlong[] { myFolder.Id }, myAcl.Id);

           

           

//END wb testing not in blog post

 

          m_serviceManager.SecurityService.

                  SetSystemACLs(

newlong[]

         { myFiles[0].MasterId }, myAcl.Id);

        }

...

 

Thanks,



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

Anonymous
Not applicable

 

Hi Wayne,

 

Thanx for the code.

I followed the steps and with the 'SetSystemACLs' command i was able to check the 'Security Override' option!

 

Kind regards,

 

Frank

0 Likes