Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
c44a1a73
authored
Jun 18, 2026
by
Finley Ge
Committed by
GitHub
Jun 18, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update private list permission count (#7143)
parent
f1f59cc3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
projects/app/src/pages/api/core/app/list.ts
+8
-6
projects/app/src/pages/api/core/dataset/list.ts
+8
-6
No files found.
projects/app/src/pages/api/core/app/list.ts
View file @
c44a1a73
...
@@ -184,21 +184,23 @@ async function handler(req: ApiRequestProps<ListAppBodyType>): Promise<ListAppRe
...
@@ -184,21 +184,23 @@ async function handler(req: ApiRequestProps<ListAppBodyType>): Promise<ListAppRe
});
});
};
};
const
getClbCount
=
(
appId
:
string
)
=>
{
return
roleList
.
filter
((
item
)
=>
String
(
item
.
resourceId
)
===
String
(
appId
)).
length
;
};
// Inherit app, check parent folder clb and it's own clb
// Inherit app, check parent folder clb and it's own clb
if
(
!
AppFolderTypeList
.
includes
(
app
.
type
)
&&
app
.
parentId
&&
app
.
inheritPermission
)
{
if
(
!
AppFolderTypeList
.
includes
(
app
.
type
)
&&
app
.
parentId
&&
app
.
inheritPermission
)
{
return
{
return
{
Per
:
getPer
(
String
(
app
.
parentId
)).
addRole
(
getPer
(
String
(
app
.
_id
)).
role
),
Per
:
getPer
(
String
(
app
.
parentId
)).
addRole
(
getPer
(
String
(
app
.
_id
)).
role
),
privateApp
:
getClbCount
(
String
(
app
.
parentId
))
<=
1
privateApp
:
roleList
.
filter
(
(
item
)
=>
String
(
item
.
resourceId
)
===
String
(
app
.
_id
)
||
String
(
item
.
resourceId
)
===
String
(
app
.
parentId
)
).
length
<=
1
};
};
}
}
return
{
return
{
Per
:
getPer
(
String
(
app
.
_id
)),
Per
:
getPer
(
String
(
app
.
_id
)),
privateApp
:
getClbCount
(
String
(
app
.
_id
))
<=
1
privateApp
:
roleList
.
filter
((
item
)
=>
String
(
item
.
resourceId
)
===
String
(
app
.
_id
)).
length
<=
1
};
};
})();
})();
...
...
projects/app/src/pages/api/core/dataset/list.ts
View file @
c44a1a73
...
@@ -147,10 +147,6 @@ async function handler(req: ApiRequestProps): Promise<GetDatasetListResponse> {
...
@@ -147,10 +147,6 @@ async function handler(req: ApiRequestProps): Promise<GetDatasetListResponse> {
isOwner
:
String
(
dataset
.
tmbId
)
===
String
(
tmbId
)
||
teamPer
.
isOwner
isOwner
:
String
(
dataset
.
tmbId
)
===
String
(
tmbId
)
||
teamPer
.
isOwner
});
});
};
};
const
getClbCount
=
(
datasetId
:
string
)
=>
{
return
roleList
.
filter
((
item
)
=>
String
(
item
.
resourceId
)
===
String
(
datasetId
)).
length
;
};
// inherit
// inherit
if
(
if
(
dataset
.
inheritPermission
&&
dataset
.
inheritPermission
&&
...
@@ -159,12 +155,18 @@ async function handler(req: ApiRequestProps): Promise<GetDatasetListResponse> {
...
@@ -159,12 +155,18 @@ async function handler(req: ApiRequestProps): Promise<GetDatasetListResponse> {
)
{
)
{
return
{
return
{
Per
:
getPer
(
String
(
dataset
.
parentId
)).
addRole
(
getPer
(
String
(
dataset
.
_id
)).
role
),
Per
:
getPer
(
String
(
dataset
.
parentId
)).
addRole
(
getPer
(
String
(
dataset
.
_id
)).
role
),
privateDataset
:
getClbCount
(
String
(
dataset
.
parentId
))
<=
1
privateDataset
:
roleList
.
filter
(
(
item
)
=>
String
(
item
.
resourceId
)
===
String
(
dataset
.
_id
)
||
String
(
item
.
resourceId
)
===
String
(
dataset
.
parentId
)
).
length
<=
1
};
};
}
}
return
{
return
{
Per
:
getPer
(
String
(
dataset
.
_id
)),
Per
:
getPer
(
String
(
dataset
.
_id
)),
privateDataset
:
getClbCount
(
String
(
dataset
.
_id
))
<=
1
privateDataset
:
roleList
.
filter
((
item
)
=>
String
(
item
.
resourceId
)
===
String
(
dataset
.
_id
)).
length
<=
1
};
};
})();
})();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment