<?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: How to revoke permissions on a document in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104045#M72625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As the admin user, navigate to the folder /Company Home/Data Dictionary/Scripts. Create New Content of plain text, and enter the code above as the content. Then save the content as "somescript.js" or whatever you want to call it. Then when you create the rule, select Script rule type and a drop-down list of the available scripts (from that folder) will appear, select the script you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to execute the script directly, you can get the Alfresco NodeRef (the unique identifier for that piece of content) of the script from the Details page for it. Then you can execute the script directly via URL by building up a URL to it, as per these instructions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/URL_Addressability#Script_Command_Processor" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/URL_Addressability#Script_Command_Processor&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2007 16:01:53 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2007-11-09T16:01:53Z</dc:date>
    <item>
      <title>How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104039#M72619</link>
      <description>HiDoes the method removePermission really apply on documents, or it only works with spaces?I am trying to make up a "private" space where everybody can drop documents but nobody (except for admin) can read them.After executing this script (due to a rule)document.removePermission("Read");document.rem</description>
      <pubDate>Fri, 01 Jun 2007 12:08:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104039#M72619</guid>
      <dc:creator>gc_yerbabuena</dc:creator>
      <dc:date>2007-06-01T12:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104040#M72620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The removePermission() API applies to the current user. Security in the repository consist of a Permission (i.e. READ) and an Authority to apply it to (e.g. EVERYONE or admin or Guest). The API you are using - removePermission() - applies to the current user who is executing the script. You want to use removePermission("Read", "EVERYONE") or similar. Also you can only remove permissions that have been specifically applied. If the node is inheriting permissions from the parent then attempting to remove a permission that is infact inherited from the parent will have no effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 14:18:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104040#M72620</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-06-01T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104041#M72621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Kevin, I finally achieved it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The container was not inheriting permissions. Instead I had granted "Contributor" role for group "EVERYONE". The problem was that I believed doing…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;space.removePermission("Read");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;…would prevent documents to be accessed, but it seems to be useless revoking "Read" access when you have "Contributor" role.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since documents inherits by default their container permissions, "guest" was able to read them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed my script and now it works: The space itself is "readable", but the documents are not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// Prevent public access to a document&lt;BR /&gt;document.removePermission("Read");&lt;BR /&gt;document.removePermission("Write");&lt;BR /&gt;document.removePermission("Delete"); &lt;BR /&gt;document.setInheritsPermissions(false);&lt;BR /&gt;document.setOwner("admin");&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it might be useful for someone else.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 16:13:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104041#M72621</guid>
      <dc:creator>gc_yerbabuena</dc:creator>
      <dc:date>2007-06-01T16:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104042#M72622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Under what conditions can I use &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;document.setInheritsPermissions(false); &lt;BR /&gt;document.setOwner("admin");&lt;SPAN class="line-numbers-rows"&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;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;document.setInheritsPermissions(false); &lt;BR /&gt;document.setOwner(editorInChief);&lt;SPAN class="line-numbers-rows"&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;where editorInChief is the user name of the only member of the group "Editor-in-Chief."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Every time I try to do this I get an error that says &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You do not have the appropriate permissions to perform this operation.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 16:37:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104042#M72622</guid>
      <dc:creator>slothrop</dc:creator>
      <dc:date>2007-08-21T16:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104043#M72623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Only users who have the ChangePermissions permission - this is only going to be the "Owner" of a node or someone with the 'Coordinator' role or an admin user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 08:58:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104043#M72623</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-08-22T08:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104044#M72624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still on the steep climb learning how to use Alfresco.&amp;nbsp; Could you please direct me where/how I would implement the code below to perform this function?&amp;nbsp; I understand how to assign rules to spaces, but I am not certain how I would go about adding this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I changed my script and now it works: The space itself is "readable", but the documents are not.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// Prevent public access to a document&lt;BR /&gt;document.removePermission("Read");&lt;BR /&gt;document.removePermission("Write");&lt;BR /&gt;document.removePermission("Delete"); &lt;BR /&gt;document.setInheritsPermissions(false);&lt;BR /&gt;document.setOwner("admin");&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2007 20:25:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104044#M72624</guid>
      <dc:creator>shanford</dc:creator>
      <dc:date>2007-10-31T20:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to revoke permissions on a document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104045#M72625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As the admin user, navigate to the folder /Company Home/Data Dictionary/Scripts. Create New Content of plain text, and enter the code above as the content. Then save the content as "somescript.js" or whatever you want to call it. Then when you create the rule, select Script rule type and a drop-down list of the available scripts (from that folder) will appear, select the script you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to execute the script directly, you can get the Alfresco NodeRef (the unique identifier for that piece of content) of the script from the Details page for it. Then you can execute the script directly via URL by building up a URL to it, as per these instructions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/URL_Addressability#Script_Command_Processor" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/URL_Addressability#Script_Command_Processor&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 16:01:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-revoke-permissions-on-a-document/m-p/104045#M72625</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-11-09T16:01:53Z</dc:date>
    </item>
  </channel>
</rss>

