<?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: Dealing with documents where getPathAsString() == null in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327626#M14627</link>
    <description>&lt;P&gt;Correct. I have retried solution 1 and now everything seems to be working. Here is an example of correct configuration.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="factoryBinding" target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService"&amp;gt;
    &amp;lt;factoryBinding name="ConservationRelationFactory" factoryName="SimpleTemplateFactory"
        targetType="ConservationRelation"&amp;gt;
        &amp;lt;acl&amp;gt;
            &amp;lt;ace granted="true" permission="Read" principal="members"/&amp;gt;
        &amp;lt;/acl&amp;gt;
    &amp;lt;/factoryBinding&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Dec 2011 14:33:48 GMT</pubDate>
    <dc:creator>fdgonthier_</dc:creator>
    <dc:date>2011-12-20T14:33:48Z</dc:date>
    <item>
      <title>Dealing with documents where getPathAsString() == null</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327624#M14625</link>
      <description>&lt;P&gt;We are making an application that is using Relation document extensively. Documents subclassing the relation object are created using &lt;CODE&gt;createDocumentModel(relationTypeName)&lt;/CODE&gt;. This means that they are attached to no particular path in the tree.&lt;/P&gt;
&lt;P&gt;This technique doesn't cause any problem when the client is connecting as Administrator but when connecting as another user, it means the user has no access to those documents. I have investigated Nuxeo source and subprojects and I found the following solutions may be possible.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Set the ACL of the Relation documents so that anybody and find (Browse) and read (Read) them. This technique alone doesn't seem to work of I have not found the right way to do it.&lt;/LI&gt;
&lt;LI&gt;Create a directory for Relation objects and put every relation object there. It should be possible to give anyone read and browse right on the directory. I believe the comment service is doing that.&lt;/LI&gt;
&lt;LI&gt;Use a service or adapter to access the relation documents and use &lt;CODE&gt;UnrestrictedSessionRunner&lt;/CODE&gt; access the documents. The tagging service is doing that.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Approach 3 is the most heavyweight and error-prone but would certainly work. Approach 2 is preferable but I would rather stick with my path-less documents and get approach 1 to work. I'm not sure what it takes for documents to be findable by non-administrator using in an NXQL document. Reference to relevant document is appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2011 20:43:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327624#M14625</guid>
      <dc:creator>fdgonthier_</dc:creator>
      <dc:date>2011-12-19T20:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with documents where getPathAsString() == null</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327625#M14626</link>
      <description>&lt;P&gt;Setting an ACL on the Relation document should work. Can you double-check? If it's really not working then it's a bug, could you please open a NXP ticket?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2011 12:30:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327625#M14626</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2011-12-20T12:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with documents where getPathAsString() == null</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327626#M14627</link>
      <description>&lt;P&gt;Correct. I have retried solution 1 and now everything seems to be working. Here is an example of correct configuration.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="factoryBinding" target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService"&amp;gt;
    &amp;lt;factoryBinding name="ConservationRelationFactory" factoryName="SimpleTemplateFactory"
        targetType="ConservationRelation"&amp;gt;
        &amp;lt;acl&amp;gt;
            &amp;lt;ace granted="true" permission="Read" principal="members"/&amp;gt;
        &amp;lt;/acl&amp;gt;
    &amp;lt;/factoryBinding&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:33:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dealing-with-documents-where-getpathasstring-null/m-p/327626#M14627</guid>
      <dc:creator>fdgonthier_</dc:creator>
      <dc:date>2011-12-20T14:33:48Z</dc:date>
    </item>
  </channel>
</rss>

