Taichi Masuyama 3 年之前
父節點
當前提交
e8a7b22468
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/app/src/server/service/page-grant.ts

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

@@ -560,7 +560,8 @@ class PageGrantService {
       }
       }
       const UserGroupRelation = mongoose.model('UserGroupRelation') as any; // TODO: Typescriptize model
       const UserGroupRelation = mongoose.model('UserGroupRelation') as any; // TODO: Typescriptize model
       const userIds = await UserGroupRelation.findAllUserIdsForUserGroup(grantUserGroupId);
       const userIds = await UserGroupRelation.findAllUserIdsForUserGroup(grantUserGroupId);
-      const childrenOrItselfGroupIds = await UserGroup.findGroupsWithDescendantsById(grantUserGroupId).map(d => d._id);
+      const childrenOrItselfGroups = await UserGroup.findGroupsWithDescendantsById(grantUserGroupId);
+      const childrenOrItselfGroupIds = childrenOrItselfGroups.map(d => d._id);
 
 
       updateGrantInfo = {
       updateGrantInfo = {
         grant: PageGrant.GRANT_USER_GROUP,
         grant: PageGrant.GRANT_USER_GROUP,