fix: collabrator (#4660)

* fix: inherit permission of orgs

* fix: org members' permission bug
This commit is contained in:
Finley Ge
2025-04-25 16:21:39 +08:00
committed by GitHub
parent 25dc8984be
commit a669a60fe6
2 changed files with 28 additions and 24 deletions

View File

@@ -1,11 +1,11 @@
import { mongoSessionRun } from '../../common/mongo/sessionRun';
import { MongoResourcePermission } from './schema';
import type { ClientSession, Model } from 'mongoose';
import type { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
import type { RequireOnlyOne } from '@fastgpt/global/common/type/utils';
import type { PerResourceTypeEnum } from '@fastgpt/global/support/permission/constant';
import type { PermissionValueType } from '@fastgpt/global/support/permission/type';
import type { ClientSession, Model } from 'mongoose';
import { mongoSessionRun } from '../../common/mongo/sessionRun';
import { getResourceClbsAndGroups } from './controller';
import type { RequireOnlyOne } from '@fastgpt/global/common/type/utils';
import type { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
import { MongoResourcePermission } from './schema';
export type SyncChildrenPermissionResourceType = {
_id: string;
@@ -193,6 +193,7 @@ export async function syncCollaborators({
resourceType: resourceType,
tmbId: item.tmbId,
groupId: item.groupId,
orgId: item.orgId,
permission: item.permission
})),
{