Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Refiling documents in inherited folders
garymccl
Hi
I'm trying to refile a document in a Worksite folder, mainly using the code from the thread titled "Move document between folders".
It works for the most part, except when I try to file to a folder where the security is inherited from the Workspace. The error I get is "cannot set default security to inherit". It works fine in folders that do not inherit their security permissions.
My guess is that document security cannot be "inherited" as such, and therefore passing a security object from a folder with the inherited property set to True to the Refile method is causing it to fail.
So how do I get around it? Is it possible, for example, to "clone" an IManSecurity object, then change the inherited property, then pass it to Refile?
Thanks in advance
Gary
Find more posts tagged with
Comments
jny
What you would do is pass in the Workspace object security instead. Like so:
// Refile document
IManProfileUpdateResult result = doc.Refile(prof, fldr.Workspace.Security);
garymccl
Think we worked it out - iterate up the tree until you find a folder that does not inherit it's security profile (or a workspace) and use that profile. this way the item being profiled should have it's security match that of it's folder.