From b9a56e1930748da15351b90d502304ca17a0ac5e Mon Sep 17 00:00:00 2001 From: jackahl <44289551+jackahl@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:32:56 +0200 Subject: [PATCH] Use existing aliases controlpanel permissions for aliases endpoint (#1825) * Use exisitng aliases controlpanel permissions for aliases endpoint * Use ManagePortalAliases for alias delete endpoint on siteroot Co-authored-by: David Glick * Update news/1820.bugfix --------- Co-authored-by: David Glick --- news/1820.bugfix | 1 + src/plone/restapi/services/aliases/configure.zcml | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 news/1820.bugfix diff --git a/news/1820.bugfix b/news/1820.bugfix new file mode 100644 index 000000000..8f2aeaaf4 --- /dev/null +++ b/news/1820.bugfix @@ -0,0 +1 @@ +Aliases endpoint: Use "Manage Portal Aliases" and "Manage Content Aliases" permissions. @jackahl diff --git a/src/plone/restapi/services/aliases/configure.zcml b/src/plone/restapi/services/aliases/configure.zcml index c6499d117..b68d1050c 100644 --- a/src/plone/restapi/services/aliases/configure.zcml +++ b/src/plone/restapi/services/aliases/configure.zcml @@ -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" /> @@ -17,7 +17,7 @@ accept="text/csv" factory=".get.AliasesGet" for="Products.CMFPlone.interfaces.IPloneSiteRoot" - permission="zope2.View" + permission="Products.CMFPlone.ManagePortalAliases" name="@aliases" /> @@ -26,7 +26,7 @@ accept="application/json,application/schema+json" factory=".get.AliasesGet" for="Products.CMFCore.interfaces.IContentish" - permission="zope2.View" + permission="Products.CMFPlone.ManageContextAliases" name="@aliases" /> @@ -34,7 +34,7 @@ method="POST" factory=".add.AliasesPost" for="*" - permission="cmf.ModifyPortalContent" + permission="Products.CMFPlone.ManageContextAliases" name="@aliases" /> @@ -42,7 +42,7 @@ method="POST" factory=".add.AliasesRootPost" for="Products.CMFPlone.interfaces.IPloneSiteRoot" - permission="cmf.ModifyPortalContent" + permission="Products.CMFPlone.ManagePortalAliases" name="@aliases" /> @@ -50,7 +50,7 @@ method="DELETE" factory=".delete.AliasesDelete" for="*" - permission="cmf.ModifyPortalContent" + permission="Products.CMFPlone.ManageContextAliases" name="@aliases" /> @@ -58,7 +58,7 @@ method="DELETE" factory=".delete.AliasesDelete" for="Products.CMFPlone.interfaces.IPloneSiteRoot" - permission="cmf.ModifyPortalContent" + permission="Products.CMFPlone.ManagePortalAliases" name="@aliases" />