Taichi Masuyama 4 лет назад
Родитель
Сommit
5a817e0aec
1 измененных файлов с 1 добавлено и 7 удалено
  1. 1 7
      packages/app/src/server/models/page.ts

+ 1 - 7
packages/app/src/server/models/page.ts

@@ -988,7 +988,7 @@ export default (crowi: Crowi): any => {
      * update empty page if exists, if not, create a new page
      */
     let page;
-    if (emptyPage != null) {
+    if (emptyPage != null && grant !== GRANT_RESTRICTED) {
       page = emptyPage;
       const descendantCount = await this.recountDescendantCount(page._id);
 
@@ -999,12 +999,6 @@ export default (crowi: Crowi): any => {
       page = new Page();
     }
 
-    let parentId: IObjectId | string | null = null;
-    const parent = await Page.getParentAndFillAncestors(path, user);
-    if (!isTopPage(path)) {
-      parentId = parent._id;
-    }
-
     page.path = path;
     page.creator = user;
     page.lastUpdateUser = user;