Skip to content

Commit

Permalink
Update configure.zcml
Browse files Browse the repository at this point in the history
  • Loading branch information
askadityapandey authored Oct 22, 2024
1 parent fb23323 commit 4f30b13
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions src/plone/restapi/services/querystring/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,27 @@
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml"
>

<!-- Editor endpoint -->
<plone:service
method="GET"
factory=".get.QuerystringEditorGet"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="cmf.ModifyPortalContent"
name="@querystring"
/>
<plone:service
method="GET"
factory=".get.QuerystringEditorGet"
for="Products.CMFCore.interfaces.IContentish"
permission="cmf.ModifyPortalContent"
name="@querystring"
/>

<!-- Public endpoint -->

<plone:service
method="GET"
factory=".get.QuerystringPublicGet"
factory=".get.QuerystringGet"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="zope2.View"
name="@querystring-public"
name="@querystring"
/>

<plone:service
method="GET"
factory=".get.QuerystringPublicGet"
factory=".get.QuerystringGet"
for="Products.CMFCore.interfaces.IContentish"
permission="zope2.View"
name="@querystring-public"
name="@querystring"
/>

<!-- Maintain caching for both endpoints -->
<cache:ruleset
for=".get.QuerystringEditorGet"
ruleset="plone.content.dynamic"
zcml:condition="have plone-app-caching-3"
/>
<cache:ruleset
for=".get.QuerystringPublicGet"
for=".get.QuerystringGet"
ruleset="plone.content.dynamic"
zcml:condition="have plone-app-caching-3"
/>

</configure>

0 comments on commit 4f30b13

Please sign in to comment.