AnsweredAssumed Answered

Document having permission error

Question asked by e-no91 on May 16, 2014
Latest reply on May 17, 2014 by e-no91
I have user A as contributor in Folder X.
And I have user A as consumer and Admin as site-manager in Folder Y.

User A uploads a file, and I will execute script by rule:

document.setPermission("SiteManager","Admin");
document.move(companyhome.childByNamePath("Sites/test/documentLibrary/a"));


What I expected is that the document can be moved to folder Y as currently it is controlled by Admin.
But what I get is 'You do not have the appropriate permissions to perform this operation.' error.

From what I understand, setPermission function that I set means that the document now is passed to Admin, as a Site Manager, and now is able to move to the destination file.

If I understnad it wrongly, how do I achieve my expectation? Thanks in advance!

ADDITIONAL: I didn't add user A as consumer for folder Y at first, and I get Destination Node is Mandatory error. After I add user A as consumer, the error is gone. Its the same as runas admin error, which makes me believe that admin is 'holding' the document now.

Outcomes