perf: org permission check (#3500)

This commit is contained in:
Archer
2024-12-30 21:44:51 +08:00
committed by archer
parent fd9600c6f8
commit 5d1d4ff64f
6 changed files with 132 additions and 267 deletions

View File

@@ -33,6 +33,13 @@ export const OrgMemberSchema = new Schema({
// }
});
OrgMemberSchema.virtual('org', {
ref: OrgCollectionName,
localField: 'orgId',
foreignField: '_id',
justOne: true
});
try {
OrgMemberSchema.index(
{