Commit 53bcd413 by heheer Committed by GitHub

app detail visibility (#5178)

parent b0150635
......@@ -276,6 +276,10 @@ const Render = (props: { appId: string; isStandalone?: string }) => {
setAppId(appId);
}, [appId, setAppId]);
const currentApp = useMemo(() => {
return myApps.find((app) => app._id === appId);
}, [appId, myApps]);
const chatHistoryProviderParams = useMemo(
() => ({ appId, source: ChatSourceEnum.online }),
[appId]
......@@ -291,7 +295,7 @@ const Render = (props: { appId: string; isStandalone?: string }) => {
return source === ChatSourceEnum.online ? (
<ChatContextProvider params={chatHistoryProviderParams}>
<ChatItemContextProvider
showRouteToAppDetail={isStandalone !== '1'}
showRouteToAppDetail={isStandalone !== '1' && !!currentApp?.permission.hasWritePer}
showRouteToDatasetDetail={isStandalone !== '1'}
isShowReadRawSource={true}
isResponseDetail={true}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment