From 8a30c2c48438cc12c9967fdf7240574ce4786321 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Wed, 29 May 2024 18:19:50 +0530 Subject: [PATCH] [WEB-1480] fix: preserve page access when making a copy (#4568) --- .../[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx index f4c60be97..e456f7d8a 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx @@ -38,7 +38,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => { // store hooks const { createPage, getPageById } = useProjectPages(projectId?.toString() ?? ""); const page = usePage(pageId?.toString() ?? ""); - const { description_html, id, name } = page; + const { access, description_html, id, name } = page; // editor markings hook const { markings, updateMarkings } = useEditorMarkings(); // fetch page details @@ -81,6 +81,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => { const formData: Partial = { name: "Copy of " + name, description_html: description_html ?? "

", + access, }; await handleCreatePage(formData)