fix: read permission; incorrect name; redirect (#5541)

This commit is contained in:
伍闲犬
2025-08-26 17:57:59 +08:00
committed by GitHub
parent 93e9cb675d
commit 3fb1ff2614
3 changed files with 9 additions and 9 deletions

View File

@@ -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);
}
});

View File

@@ -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>
)}