<?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 Fastest way to retrieve all content for a user? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/fastest-way-to-retrieve-all-content-for-a-user/m-p/144770#M101221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to develop a WebScript to retrieve all content from the repository (from app:company_home//*) where an user has access (i.e. &lt;/SPAN&gt;&lt;STRONG&gt;Consumer&lt;/STRONG&gt;&lt;SPAN&gt; permission) and doing it the fastest way possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried several approachs, the fastest being:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Set&amp;lt;NodeRef&amp;gt; nodes = permissionService&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.findNodesByAssignedPermissionForCurrentUser(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PermissionService.CONSUMER, true, true, true);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and then walking the tree recursively from these nodes checking permission access without repeating searchs (i.e. one of the nodes in the set containing another as descendant).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This approach is slightly faster than walking the whole app:company_home tree.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that its performance depends mostly in the "inherit permissions" property of a node and in the state of the permission cache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried with Lucene, but Lucene Search doesn't seem to support user-permission metadata, does it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas or suggestions would highly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Nov 2007 12:09:57 GMT</pubDate>
    <dc:creator>albertomv</dc:creator>
    <dc:date>2007-11-23T12:09:57Z</dc:date>
    <item>
      <title>Fastest way to retrieve all content for a user?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/fastest-way-to-retrieve-all-content-for-a-user/m-p/144770#M101221</link>
      <description>Hello!I'm trying to develop a WebScript to retrieve all content from the repository (from app:company_home//*) where an user has access (i.e. Consumer permission) and doing it the fastest way possible.I've tried several approachs, the fastest being&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;et&amp;lt;NodeRef&amp;gt; nodes = permissionService&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Fri, 23 Nov 2007 12:09:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/fastest-way-to-retrieve-all-content-for-a-user/m-p/144770#M101221</guid>
      <dc:creator>albertomv</dc:creator>
      <dc:date>2007-11-23T12:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way to retrieve all content for a user?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/fastest-way-to-retrieve-all-content-for-a-user/m-p/144771#M101222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no easy way to do what you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.2 will have a new permission model which will make this query possible, althought the support you want is likely not to be implemented in the first cut. I will take another look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 11:35:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/fastest-way-to-retrieve-all-content-for-a-user/m-p/144771#M101222</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2007-12-03T11:35:22Z</dc:date>
    </item>
  </channel>
</rss>

