Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Allowed to Add Content to Search Folder
bfelknor
Version 8.x Model / VB / IManExt2.BrowseCmd
I'm trying to determine if a user can add content to a Document Search Folder.
I return a selected object from the BrowsCmd:
- retSelectedItem = iContext.Item("IManExt2.BrowseCmd.SelectedObjects")
After checking the SelectedItem type (in this case a Doc Search Folder) I cast it as iManDocumentSearchFolder.
- Set pDoxSrchFolder = retSelectedItem
If I check pDoxSrchFolder.Contents.IsOperationAllowed(imAddContentsOp), it returns False.
The user does have rights to do this, however, and it can be done through the MailSite UI.
I get the desired results working with iManDocumentFolder by casting the folder.Contents to an iManDocuments collection, then checking Documents.IsOperationAllowed....
But I can't do the same for the Search Folder's contents...any help ?
Thanks.
Bruce
Find more posts tagged with
Comments
Migrateduser
I think what you want to do instead is check the DisableImportFileToSearchFolder registry key
?
bfelknor
I don't think so. That would apply to imports to all Search Folders. I'm interested in the rights to a specific search folder.
Thanks.
dabird
The Contents collection on a search folder is always read-only, as IManage.dll builds a dynamic collection based on the folder's search parameters. Under the hood, FileSite is checking whether the user has import rights on the database in which the folder resides. It's also checking the reg key that DocAuto mentioned in his previous post.
The document is ultimately imported at the database level, with its profile being that of the search folder.
'folder is of type IManDocumentSearchFolder
folder.Database.IsOperationAllowed(imDatabaseOperation.imDatabaseCreateDocument);
bfelknor
Then the only way to really check the rights of a user to add documents to a search folder is examine Security. If this is all being done with a U/I displayed, it might be less costly to just check database rights, the reg mentioned and allow an import to error-out.