perf: permission index & model table collaborator context lazy mount (#5703)

This commit is contained in:
Finley Ge
2025-09-25 14:11:05 +08:00
committed by GitHub
parent d4c1e25598
commit 7cdb16c816
3 changed files with 45 additions and 15 deletions

View File

@@ -78,6 +78,11 @@ ResourcePermissionSchema.virtual('org', {
});
try {
ResourcePermissionSchema.index({
resourceType: 1,
teamId: 1
});
// Indexes for resourceId-based resources
ResourcePermissionSchema.index(
{