Просмотр исходного кода

add missing populate for ancestor page

Futa Arai 2 лет назад
Родитель
Сommit
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 {