소스 검색

add missing populate for ancestor page

Futa Arai 2 년 전
부모
커밋
d4d51d4319
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      apps/app/src/pages/[[...path]].page.tsx

+ 1 - 0
apps/app/src/pages/[[...path]].page.tsx

@@ -461,6 +461,7 @@ async function injectPageData(context: GetServerSidePropsContext, props: Props):
     // apply parent page grant, without groups that user isn't related to
     const ancestor = await Page.findAncestorByPathAndViewer(currentPathname, user);
     if (ancestor != null) {
+      ancestor.populate('grantedGroups.item');
       const userRelatedGrantedGroups = (await pageService.getUserRelatedGrantedGroups(ancestor, user)).map((group) => {
         if (isPopulated(group.item)) {
           return {