Skip to content

Commit

Permalink
Use existing aliases controlpanel permissions for aliases endpoint (#…
Browse files Browse the repository at this point in the history
…1825)

* Use exisitng aliases controlpanel permissions for aliases endpoint

* Use ManagePortalAliases for alias delete endpoint on siteroot

Co-authored-by: David Glick <[email protected]>

* Update news/1820.bugfix

---------

Co-authored-by: David Glick <[email protected]>
  • Loading branch information
jackahl and davisagli authored Oct 16, 2024
1 parent f68fab7 commit b9a56e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions news/1820.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Aliases endpoint: Use "Manage Portal Aliases" and "Manage Content Aliases" permissions. @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.ManagePortalAliases"
name="@aliases"
/>

Expand Down

0 comments on commit b9a56e1

Please sign in to comment.