From a321ad4a7a2e497ea3e96f1d93cfa3f2da8774c5 Mon Sep 17 00:00:00 2001 From: jackahl Date: Tue, 15 Oct 2024 15:59:54 +0200 Subject: [PATCH] Use exisitng aliases controlpanel permissions for aliases endpoint --- news/1820.bugfix | 2 ++ src/plone/restapi/services/aliases/configure.zcml | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 news/1820.bugfix diff --git a/news/1820.bugfix b/news/1820.bugfix new file mode 100644 index 0000000000..3be03dfd5b --- /dev/null +++ b/news/1820.bugfix @@ -0,0 +1,2 @@ +Use exisitng aliases controlpanel permissions for aliases endpoint as well +[jackahl] diff --git a/src/plone/restapi/services/aliases/configure.zcml b/src/plone/restapi/services/aliases/configure.zcml index c6499d117a..8ac3763980 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.ManageContextAliases" name="@aliases" />