Working With Folders: "You are not authorized to perform that operation"

Hi All,

I read all 127 posts in this forum for the error message above but none helped. I have a button in a view which calls LotusScript code in a script library. This functionality only runs on the Notes client, I am not dealing with web users. This is a custom application, so no issues explicit to mail databases are applicable. I read through the Agent FAQs, but they didn’t offer me any insights, considering that my code is not in an agent.

Users get “You are not authorized to perform that operation: Sorted Doc Collection” when they get to the part of the code that removes or adds documents from/to my folder called “Sorted Doc Collection” via NotesViewEntryCollection and its RemoveAllFromFolder and PutAllInFolder methods.

I checked the security settings of the “Sorted Doc Collection” folder and its default settings are for reading to allow anyone with reader access and above and for creating docs to allow anyone with author access and above.

I checked Designer Help, thinking that maybe use of NotesViewEntryCollection and its RemoveAllFromFolder and PutAllInFolder methods requires some special security settings, such as in the server doc, but nothing is documented.

Mind you, this code works fine for me, I have Manager access to the database. I tried everything to eliminate the error for the users, and as a desperate last ditch effort, I had to explicitly add each user to the ACL of the DB and give them Manager access!!! This is a terrible Band-Aid solution but I have no idea what security tweaking is needed. The settings in the security section of the server doc seem to only imply authority to run agents, and besides, it doesn’t seem right that simply working with docs in folders requires that I add end user names to fields in the security doc.

Can anyone help?

Thanks in advance,

Ken

Subject: Working With Folders: “You are not authorized to perform that operation”

Ken:

Give the users Editor with Delete rights. When you use the RemoveAllFromFolder command it is actually “cutting/deleting” the files from that folder and placing (PutAllInFolder)them in another. If the users do not have delete rights then they will not be able to run that command. Unless I am missing something of what you are doing this should work. Let me know.

Thanks!

Chris

Subject: RE: Working With Folders: “You are not authorized to perform that operation”

Chris,

You know what, you may be right! It is worth a shot. I checked the ACL for the original group the users were in, and I had given them Editor access but left “Delete documents” UNCHECKED. It didn’t occur to me that this was needed, because the code I am using does not really delete or even move documents, it just removes them from the collection which has the net effect of clearing my “Sorted Doc Collection” folder. If I check that “Delete documents” setting in the ACL, I will end up giving these users the ability to actually delete real documents, but if I have to do it, I’ll do it. This is far better than giving them Manager access!

I am waiting for the Notes Admin guy to supply me with a test user ID I can try this out with, which will probably be in a day or two. Hopefully, by the end of the week I will report back if your suggestion worked.

Thanks so much for posting, Chris!

Ken