|
|
@@ -1051,6 +1051,7 @@ schema.methods.calculateAndUpdateLatestRevisionBodyLength = async function(this:
|
|
|
* get all groups of Page that user is related to
|
|
|
*/
|
|
|
schema.methods.getUserRelatedGrantedGroups = async function(this: PageDocument, user): Promise<PopulatedGrantedGroup[]> {
|
|
|
+ // eslint-disable-next-line rulesdir/no-populate
|
|
|
const populatedPage = await this.populate<{grantedGroups: PopulatedGrantedGroup[] | null}>('grantedGroups.item');
|
|
|
const userRelatedGroupIds = [
|
|
|
...(await UserGroupRelation.findAllGroupsForUser(user)).map(ugr => ugr._id.toString()),
|