mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix/group (#3012)
* fix: app/dataset list private resource bug * fix: auth owner
This commit is contained in:
@@ -72,6 +72,12 @@ export const authAppByTmbId = async ({
|
||||
const isOwner = tmbPer.isOwner || String(app.tmbId) === String(tmbId);
|
||||
|
||||
const { Per } = await (async () => {
|
||||
if (isOwner) {
|
||||
return {
|
||||
Per: new AppPermission({ isOwner: true })
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
AppFolderTypeList.includes(app.type) ||
|
||||
app.inheritPermission === false ||
|
||||
|
@@ -64,6 +64,11 @@ export const authDatasetByTmbId = async ({
|
||||
|
||||
// get dataset permission or inherit permission from parent folder.
|
||||
const { Per } = await (async () => {
|
||||
if (isOwner) {
|
||||
return {
|
||||
Per: new DatasetPermission({ isOwner: true })
|
||||
};
|
||||
}
|
||||
if (
|
||||
dataset.type === DatasetTypeEnum.folder ||
|
||||
dataset.inheritPermission === false ||
|
||||
|
Reference in New Issue
Block a user