mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-26 18:51:50 +02:00
Ensure that the Chat pane is disabled for read-only link collaborators (#23785)
GitOrigin-RevId: 56e1b1d6b08ec7537386cab0b251e325d681e117
This commit is contained in:
@@ -14,9 +14,11 @@ import { useChatPane } from '@/features/ide-react/hooks/use-chat-pane'
|
||||
import { EditorAndPdf } from '@/features/ide-react/components/editor-and-pdf'
|
||||
import HistoryContainer from '@/features/ide-react/components/history-container'
|
||||
import getMeta from '@/utils/meta'
|
||||
import { useEditorContext } from '@/shared/context/editor-context'
|
||||
|
||||
export const MainLayout: FC = () => {
|
||||
const { view } = useLayoutContext()
|
||||
const { isRestrictedTokenMember } = useEditorContext()
|
||||
|
||||
const {
|
||||
isOpen: sidebarIsOpen,
|
||||
@@ -39,7 +41,7 @@ export const MainLayout: FC = () => {
|
||||
handlePaneExpand: handleChatExpand,
|
||||
} = useChatPane()
|
||||
|
||||
const chatEnabled = getMeta('ol-chatEnabled')
|
||||
const chatEnabled = getMeta('ol-chatEnabled') && !isRestrictedTokenMember
|
||||
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user