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
9f21add7
authored
Apr 30, 2025
by
Finley Ge
Committed by
GitHub
Apr 30, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: app/dataset list folders' side menu permission bug (#4734)
parent
4b8db293
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
72 deletions
+17
-72
projects/app/src/pages/dashboard/apps/index.tsx
+10
-42
projects/app/src/pages/dataset/list/index.tsx
+7
-30
No files found.
projects/app/src/pages/dashboard/apps/index.tsx
View file @
9f21add7
...
@@ -25,7 +25,6 @@ import {
...
@@ -25,7 +25,6 @@ import {
import
type
{
CreateAppType
}
from
'@/pageComponents/dashboard/apps/CreateModal'
;
import
type
{
CreateAppType
}
from
'@/pageComponents/dashboard/apps/CreateModal'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
MyBox
from
'@fastgpt/web/components/common/MyBox'
;
import
MyBox
from
'@fastgpt/web/components/common/MyBox'
;
import
LightRowTabs
from
'@fastgpt/web/components/common/Tabs/LightRowTabs'
;
import
{
useSystem
}
from
'@fastgpt/web/hooks/useSystem'
;
import
{
useSystem
}
from
'@fastgpt/web/hooks/useSystem'
;
import
MyIcon
from
'@fastgpt/web/components/common/Icon'
;
import
MyIcon
from
'@fastgpt/web/components/common/Icon'
;
import
JsonImportModal
from
'@/pageComponents/dashboard/apps/JsonImportModal'
;
import
JsonImportModal
from
'@/pageComponents/dashboard/apps/JsonImportModal'
;
...
@@ -35,6 +34,7 @@ import List from '@/pageComponents/dashboard/apps/List';
...
@@ -35,6 +34,7 @@ import List from '@/pageComponents/dashboard/apps/List';
import
MCPToolsEditModal
from
'@/pageComponents/dashboard/apps/MCPToolsEditModal'
;
import
MCPToolsEditModal
from
'@/pageComponents/dashboard/apps/MCPToolsEditModal'
;
import
{
getUtmWorkflow
}
from
'@/web/support/marketing/utils'
;
import
{
getUtmWorkflow
}
from
'@/web/support/marketing/utils'
;
import
{
useMount
}
from
'ahooks'
;
import
{
useMount
}
from
'ahooks'
;
import
{
AppCollaboratorDeleteParams
}
from
'@fastgpt/global/core/app/collaborator'
;
const
CreateModal
=
dynamic
(()
=>
import
(
'@/pageComponents/dashboard/apps/CreateModal'
));
const
CreateModal
=
dynamic
(()
=>
import
(
'@/pageComponents/dashboard/apps/CreateModal'
));
const
EditFolderModal
=
dynamic
(
const
EditFolderModal
=
dynamic
(
...
@@ -286,49 +286,17 @@ const MyApps = ({ MenuIcon }: { MenuIcon: JSX.Element }) => {
...
@@ -286,49 +286,17 @@ const MyApps = ({ MenuIcon }: { MenuIcon: JSX.Element }) => {
permission
:
folderDetail
.
permission
,
permission
:
folderDetail
.
permission
,
onGetCollaboratorList
:
()
=>
getCollaboratorList
(
folderDetail
.
_id
),
onGetCollaboratorList
:
()
=>
getCollaboratorList
(
folderDetail
.
_id
),
permissionList
:
AppPermissionList
,
permissionList
:
AppPermissionList
,
onUpdateCollaborators
:
({
onUpdateCollaborators
:
(
props
)
=>
members
,
postUpdateAppCollaborators
({
groups
,
...
props
,
permission
}:
{
members
?:
string
[];
groups
?:
string
[];
permission
:
PermissionValueType
;
})
=>
{
return
postUpdateAppCollaborators
({
members
,
groups
,
permission
,
appId
:
folderDetail
.
_id
appId
:
folderDetail
.
_id
});
}),
},
refreshDeps
:
[
folderDetail
.
_id
,
folderDetail
.
inheritPermission
],
refreshDeps
:
[
folderDetail
.
_id
,
folderDetail
.
inheritPermission
],
onDelOneCollaborator
:
async
({
onDelOneCollaborator
:
async
(
params
)
=>
tmbId
,
deleteAppCollaborators
({
groupId
,
...
params
,
orgId
appId
:
folderDetail
.
_id
}:
{
})
tmbId
?:
string
;
groupId
?:
string
;
orgId
?:
string
;
})
=>
{
if
(
tmbId
)
{
return
deleteAppCollaborators
({
appId
:
folderDetail
.
_id
,
tmbId
});
}
else
if
(
groupId
)
{
return
deleteAppCollaborators
({
appId
:
folderDetail
.
_id
,
groupId
});
}
else
if
(
orgId
)
{
return
deleteAppCollaborators
({
appId
:
folderDetail
.
_id
,
orgId
});
}
}
}
}
}
}
/>
/>
</
Box
>
</
Box
>
...
...
projects/app/src/pages/dataset/list/index.tsx
View file @
9f21add7
...
@@ -242,39 +242,16 @@ const Dataset = () => {
...
@@ -242,39 +242,16 @@ const Dataset = () => {
permission
:
folderDetail
.
permission
,
permission
:
folderDetail
.
permission
,
onGetCollaboratorList
:
()
=>
getCollaboratorList
(
folderDetail
.
_id
),
onGetCollaboratorList
:
()
=>
getCollaboratorList
(
folderDetail
.
_id
),
permissionList
:
DatasetPermissionList
,
permissionList
:
DatasetPermissionList
,
onUpdateCollaborators
:
({
onUpdateCollaborators
:
(
params
)
=>
members
,
groups
,
permission
}:
{
members
?:
string
[];
groups
?:
string
[];
permission
:
PermissionValueType
;
})
=>
postUpdateDatasetCollaborators
({
postUpdateDatasetCollaborators
({
members
,
...
params
,
groups
,
datasetId
:
folderDetail
.
_id
permission
,
}),
onDelOneCollaborator
:
async
(
params
)
=>
deleteDatasetCollaborators
({
...
params
,
datasetId
:
folderDetail
.
_id
datasetId
:
folderDetail
.
_id
}),
}),
onDelOneCollaborator
:
async
({
tmbId
,
groupId
,
orgId
})
=>
{
if
(
tmbId
)
{
return
deleteDatasetCollaborators
({
datasetId
:
folderDetail
.
_id
,
tmbId
});
}
else
if
(
groupId
)
{
return
deleteDatasetCollaborators
({
datasetId
:
folderDetail
.
_id
,
groupId
});
}
else
if
(
orgId
)
{
return
deleteDatasetCollaborators
({
datasetId
:
folderDetail
.
_id
,
orgId
});
}
},
refreshDeps
:
[
folderDetail
.
_id
,
folderDetail
.
inheritPermission
]
refreshDeps
:
[
folderDetail
.
_id
,
folderDetail
.
inheritPermission
]
}
}
}
}
/>
/>
...
...
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