Skip to content

Commit

Permalink
Use exisitng aliases controlpanel permissions for aliases endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jackahl committed Oct 15, 2024
1 parent f68fab7 commit a321ad4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions news/1820.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use exisitng aliases controlpanel permissions for aliases endpoint as well
[jackahl]
14 changes: 7 additions & 7 deletions src/plone/restapi/services/aliases/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
accept="application/json,application/schema+json"
factory=".get.AliasesGet"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="zope2.View"
permission="Products.CMFPlone.ManagePortalAliases"
name="@aliases"
/>

Expand All @@ -17,7 +17,7 @@
accept="text/csv"
factory=".get.AliasesGet"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="zope2.View"
permission="Products.CMFPlone.ManagePortalAliases"
name="@aliases"
/>

Expand All @@ -26,39 +26,39 @@
accept="application/json,application/schema+json"
factory=".get.AliasesGet"
for="Products.CMFCore.interfaces.IContentish"
permission="zope2.View"
permission="Products.CMFPlone.ManageContextAliases"
name="@aliases"
/>

<plone:service
method="POST"
factory=".add.AliasesPost"
for="*"
permission="cmf.ModifyPortalContent"
permission="Products.CMFPlone.ManageContextAliases"
name="@aliases"
/>

<plone:service
method="POST"
factory=".add.AliasesRootPost"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="cmf.ModifyPortalContent"
permission="Products.CMFPlone.ManagePortalAliases"
name="@aliases"
/>

<plone:service
method="DELETE"
factory=".delete.AliasesDelete"
for="*"
permission="cmf.ModifyPortalContent"
permission="Products.CMFPlone.ManageContextAliases"
name="@aliases"
/>

<plone:service
method="DELETE"
factory=".delete.AliasesDelete"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
permission="cmf.ModifyPortalContent"
permission="Products.CMFPlone.ManageContextAliases"
name="@aliases"
/>

Expand Down

0 comments on commit a321ad4

Please sign in to comment.