<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Document having permission error in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299366#M252496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you so much for the explanation!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't done the runas admin code, I just found out about this code and trying it out. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://tpeelen.wordpress.com/2011/04/29/sudo-for-scripts-in-alfresco/" rel="nofollow noopener noreferrer"&gt;http://tpeelen.wordpress.com/2011/04/29/sudo-for-scripts-in-alfresco/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the site, where do I actually put the sudoScript.java file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or maybe there is another easier way?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 May 2014 03:34:45 GMT</pubDate>
    <dc:creator>e-no91</dc:creator>
    <dc:date>2014-05-17T03:34:45Z</dc:date>
    <item>
      <title>Document having permission error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299364#M252494</link>
      <description>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 ex</description>
      <pubDate>Fri, 16 May 2014 12:12:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299364#M252494</guid>
      <dc:creator>e-no91</dc:creator>
      <dc:date>2014-05-16T12:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Document having permission error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299365#M252495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Before you added user A as consumer on folder Y.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;User A might don't even have read permission on Y ,so it is as if folder Y dose not exist to user A .so you got the "Destination Node is Mandatory error"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After you added user A as consumer on folder Y&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are using user A to upload a file to Folder X and user A is a contributor,But neither of the following two lines will execute successfully&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;document.setPermission("SiteManager","Admin");&lt;BR /&gt;document.move(companyhome.childByNamePath("Sites/test/documentLibrary/a"));&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.setPermission requires that the current authentication has "ChangePermissions" permission .User A is a contributor which dosen't have "ChangePermissions" permission.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.move method requires&amp;nbsp; the current authentication has the permission to delete the node in the source folder and create it in the destination folder.User A is a contributor on Folder X which dosen't have delete permission and he is a consumer on Folder Y which dosen't alos have create permission.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Technically if you run your script as admin ,it will execute successfully. Could you paste your code that runas admin? I gusess there is something wrong in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As&amp;nbsp; "admin is holding the document now",I don't think it will happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2014 02:48:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299365#M252495</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-05-17T02:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Document having permission error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299366#M252496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you so much for the explanation!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't done the runas admin code, I just found out about this code and trying it out. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://tpeelen.wordpress.com/2011/04/29/sudo-for-scripts-in-alfresco/" rel="nofollow noopener noreferrer"&gt;http://tpeelen.wordpress.com/2011/04/29/sudo-for-scripts-in-alfresco/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the site, where do I actually put the sudoScript.java file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or maybe there is another easier way?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2014 03:34:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/document-having-permission-error/m-p/299366#M252496</guid>
      <dc:creator>e-no91</dc:creator>
      <dc:date>2014-05-17T03:34:45Z</dc:date>
    </item>
  </channel>
</rss>

