mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 23:22:22 +00:00
fix: read permission; incorrect name; redirect (#5541)
This commit is contained in:
@@ -15,6 +15,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useMount } from 'ahooks';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
|
||||
const HomepageSetting = dynamic(() => import('@/pageComponents/chat/ChatSetting/HomepageSetting'));
|
||||
const LogDetails = dynamic(() => import('@/pageComponents/chat/ChatSetting/LogDetails'));
|
||||
@@ -28,6 +29,7 @@ const ChatSetting = () => {
|
||||
const { isPc } = useSystem();
|
||||
const { t } = useTranslation();
|
||||
const { feConfigs } = useSystemStore();
|
||||
const { userInfo } = useUserStore();
|
||||
|
||||
const { tab: tabQuery } = router.query as { tab: ChatSettingTabOptionEnum };
|
||||
const [isOpenDiagram, setIsOpenDiagram] = useState(false);
|
||||
@@ -60,7 +62,7 @@ const ChatSetting = () => {
|
||||
);
|
||||
|
||||
useMount(() => {
|
||||
if (!feConfigs?.isPlus) {
|
||||
if (!feConfigs?.isPlus || !userInfo?.team.permission.hasManagePer) {
|
||||
handlePaneChange(ChatSidebarPaneEnum.TEAM_APPS);
|
||||
}
|
||||
});
|
||||
|
@@ -64,7 +64,7 @@ const UserAvatarPopover = ({
|
||||
>
|
||||
<Avatar src={userInfo?.avatar} bg="myGray.200" borderRadius="50%" w={5} h={5} />
|
||||
<Box flex="1 1 0" minW="0" whiteSpace="pre-wrap">
|
||||
{userInfo?.username ?? '-'}
|
||||
{userInfo?.team.memberName ?? '-'}
|
||||
</Box>
|
||||
</Flex>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user