yohei0125 4 years ago
parent
commit
fd96a87ab8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/app/src/server/service/page.ts

+ 2 - 2
packages/app/src/server/service/page.ts

@@ -215,7 +215,7 @@ class PageService {
     });
     });
   }
   }
 
 
-  canDeleteCompletely(path: string, creatorId: ObjectIdLike, operator: any, isRecursively: boolean): boolean {
+  canDeleteCompletely(path: string, creatorId: ObjectIdLike, operator: any | null, isRecursively: boolean): boolean {
     if (operator == null || isTopPage(path) || isUsersProtectedPages(path)) return false;
     if (operator == null || isTopPage(path) || isUsersProtectedPages(path)) return false;
 
 
     const pageCompleteDeletionAuthority = this.crowi.configManager.getConfig('crowi', 'security:pageCompleteDeletionAuthority');
     const pageCompleteDeletionAuthority = this.crowi.configManager.getConfig('crowi', 'security:pageCompleteDeletionAuthority');
@@ -226,7 +226,7 @@ class PageService {
     return this.canDeleteLogic(creatorId, operator, isRecursively, singleAuthority, recursiveAuthority);
     return this.canDeleteLogic(creatorId, operator, isRecursively, singleAuthority, recursiveAuthority);
   }
   }
 
 
-  canDelete(path: string, creatorId: ObjectIdLike, operator: any, isRecursively: boolean): boolean {
+  canDelete(path: string, creatorId: ObjectIdLike, operator: any | null, isRecursively: boolean): boolean {
     if (operator == null || isUsersProtectedPages(path) || isTopPage(path)) return false;
     if (operator == null || isUsersProtectedPages(path) || isTopPage(path)) return false;
 
 
     const pageDeletionAuthority = this.crowi.configManager.getConfig('crowi', 'security:pageDeletionAuthority');
     const pageDeletionAuthority = this.crowi.configManager.getConfig('crowi', 'security:pageDeletionAuthority');