[WEB-1480] fix: preserve page access when making a copy (#4568)
This commit is contained in:
parent
6636a64817
commit
8a30c2c484
1 changed files with 2 additions and 1 deletions
|
|
@ -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<TPage> = {
|
||||
name: "Copy of " + name,
|
||||
description_html: description_html ?? "<p></p>",
|
||||
access,
|
||||
};
|
||||
|
||||
await handleCreatePage(formData)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue