fix: list permission (#3386)

This commit is contained in:
Archer 2024-12-13 11:00:22 +08:00 committed by GitHub
parent c41def5fbb
commit 30a89fe4cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ async function handler(req: ApiRequestProps<ListAppBody>): Promise<AppListItemTy
? { ? {
$or: [idList, parseParentIdInMongo(parentId)] $or: [idList, parseParentIdInMongo(parentId)]
} }
: idList; : { $or: [idList, { parentId: null }] };
const searchMatch = searchKey const searchMatch = searchKey
? { ? {

View File

@ -82,7 +82,7 @@ async function handler(req: ApiRequestProps<GetDatasetListBody>) {
? { ? {
$or: [idList, parseParentIdInMongo(parentId)] $or: [idList, parseParentIdInMongo(parentId)]
} }
: idList; : { $or: [idList, { parentId: null }] };
const searchMatch = searchKey const searchMatch = searchKey
? { ? {