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
ae3fbafa
authored
Sep 17, 2025
by
伍闲犬
Committed by
GitHub
Sep 17, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: permission for favourite apps chatting (#5668)
parent
fb536d16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
packages/service/support/permission/app/auth.ts
+4
-0
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx
+5
-0
No files found.
packages/service/support/permission/app/auth.ts
View file @
ae3fbafa
...
@@ -114,6 +114,10 @@ export const authAppByTmbId = async ({
...
@@ -114,6 +114,10 @@ export const authAppByTmbId = async ({
const
Per
=
new
AppPermission
({
role
:
sumPer
(
folderPer
,
myPer
),
isOwner
});
const
Per
=
new
AppPermission
({
role
:
sumPer
(
folderPer
,
myPer
),
isOwner
});
if
(
app
.
favourite
||
app
.
quick
)
{
Per
.
addRole
(
ReadRoleVal
);
}
if
(
!
Per
.
checkPer
(
per
))
{
if
(
!
Per
.
checkPer
(
per
))
{
return
Promise
.
reject
(
AppErrEnum
.
unAuthApp
);
return
Promise
.
reject
(
AppErrEnum
.
unAuthApp
);
}
}
...
...
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx
View file @
ae3fbafa
...
@@ -27,6 +27,7 @@ import ChatHistorySidebar from '@/pageComponents/chat/slider/ChatSliderSidebar';
...
@@ -27,6 +27,7 @@ import ChatHistorySidebar from '@/pageComponents/chat/slider/ChatSliderSidebar';
import
ChatSliderMobileDrawer
from
'@/pageComponents/chat/slider/ChatSliderMobileDrawer'
;
import
ChatSliderMobileDrawer
from
'@/pageComponents/chat/slider/ChatSliderMobileDrawer'
;
import
dynamic
from
'next/dynamic'
;
import
dynamic
from
'next/dynamic'
;
import
{
getNanoid
}
from
'@fastgpt/global/common/string/tools'
;
import
{
getNanoid
}
from
'@fastgpt/global/common/string/tools'
;
import
{
ChatErrEnum
}
from
'@fastgpt/global/common/error/code/chat'
;
const
CustomPluginRunBox
=
dynamic
(()
=>
import
(
'@/pageComponents/chat/CustomPluginRunBox'
));
const
CustomPluginRunBox
=
dynamic
(()
=>
import
(
'@/pageComponents/chat/CustomPluginRunBox'
));
...
@@ -78,6 +79,10 @@ const AppChatWindow = ({ myApps }: Props) => {
...
@@ -78,6 +79,10 @@ const AppChatWindow = ({ myApps }: Props) => {
errorToast
:
''
,
errorToast
:
''
,
onError
(
e
:
any
)
{
onError
(
e
:
any
)
{
if
(
e
?.
code
&&
e
.
code
>=
502000
)
{
if
(
e
?.
code
&&
e
.
code
>=
502000
)
{
if
(
e
?.
statusText
===
ChatErrEnum
.
unAuthChat
)
{
onChangeChatId
();
return
;
}
handlePaneChange
(
ChatSidebarPaneEnum
.
TEAM_APPS
);
handlePaneChange
(
ChatSidebarPaneEnum
.
TEAM_APPS
);
}
}
},
},
...
...
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