diff --git a/src/stores/AuthStore.js b/src/stores/AuthStore.js
index fe6802d..9b842cf 100644
--- a/src/stores/AuthStore.js
+++ b/src/stores/AuthStore.js
@@ -7,6 +7,7 @@ import { API_HOST, BUILD_VERSION } from '@/config'
export const PERM_MERGE_CONVERSATION = 'merge-conversation'
export const PERM_ASSIGN_NEW_CONVERSATION = 'assign-new-conversation'
export const PERM_USE_EMAL = 'use-email'
+export const PERM_USE_WHATSAPP = 'use-whatsapp'
export const PERM_IMPORT_EMAIL = 'import-email'
const useAuthStore = create(devtools((set, get) => ({
@@ -30,7 +31,7 @@ const useAuthStore = create(devtools((set, get) => ({
const { loginUser } = get()
if (perm === PERM_USE_EMAL) {
- return ['501', '466', '599', '495', '143', '370', '639', '513', '654', '404', '383', '227'].includes(loginUser.userId)
+ return true//['501', '466', '599', '495', '143', '370', '639', '513', '654', '404', '383', '227'].includes(loginUser.userId)
}
// 导入邮件消息,需要配置才能使用
diff --git a/src/views/AuthApp.jsx b/src/views/AuthApp.jsx
index 661e1a3..ea8e0ff 100644
--- a/src/views/AuthApp.jsx
+++ b/src/views/AuthApp.jsx
@@ -1,9 +1,7 @@
import ErrorBoundary from '@/components/ErrorBoundary'
import useAuthStore from '@/stores/AuthStore'
import { useThemeContext } from '@/stores/ThemeContext'
-import { Conditional } from '@/components/Conditional'
import useConversationStore from '@/stores/ConversationStore'
-import { PERM_USE_EMAL } from '@/stores/AuthStore'
import {
App as AntApp,
ConfigProvider,
@@ -13,7 +11,7 @@ import {
FloatButton,
theme,
} from 'antd'
-import { BugOutlined, MailOutlined } from '@ant-design/icons'
+import { BugOutlined } from '@ant-design/icons'
import zhLocale from 'antd/locale/zh_CN'
import 'dayjs/locale/zh-cn'
import { useEffect } from 'react'
@@ -38,8 +36,8 @@ function AuthApp() {
const [messageApi, contextHolder] = message.useMessage()
const { colorPrimary, borderRadius } = useThemeContext()
- const [loginUser, sendNotify, isPermitted] = useAuthStore((state) => [
- state.loginUser, state.sendNotify, state.isPermitted
+ const [loginUser, sendNotify] = useAuthStore((state) => [
+ state.loginUser, state.sendNotify
])
const href = useHref()
@@ -64,10 +62,7 @@ function AuthApp() {
connectWebsocket(loginUser.userId)
fetchInitialData(loginUser)
- let _fetchEmailWorker;
- if (isPermitted(PERM_USE_EMAL)) {
- _fetchEmailWorker = startEmailInterval(loginUser.userId)
- }
+ _fetchEmailWorker = startEmailInterval(loginUser.userId)
}
return () => {
disconnectWebsocket()
@@ -136,10 +131,7 @@ function AuthApp() {
insetInlineEnd: 94,
}}
>
-