12-19-2011 03:43 PM
We are making an application that is using Relation document extensively. Documents subclassing the relation object are created using createDocumentModel(relationTypeName)
. This means that they are attached to no particular path in the tree.
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.
UnrestrictedSessionRunner
access the documents. The tagging service is doing that.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.
12-20-2011 09:33 AM
Correct. I have retried solution 1 and now everything seems to be working. Here is an example of correct configuration.
<extension point="factoryBinding" target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService">
<factoryBinding name="ConservationRelationFactory" factoryName="SimpleTemplateFactory"
targetType="ConservationRelation">
<acl>
<ace granted="true" permission="Read" principal="members"/>
</acl>
</factoryBinding>
</extension>
12-20-2011 07:30 AM
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?
12-20-2011 09:33 AM
Correct. I have retried solution 1 and now everything seems to be working. Here is an example of correct configuration.
<extension point="factoryBinding" target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService">
<factoryBinding name="ConservationRelationFactory" factoryName="SimpleTemplateFactory"
targetType="ConservationRelation">
<acl>
<ace granted="true" permission="Read" principal="members"/>
</acl>
</factoryBinding>
</extension>
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.