From 90c8338a599ee637332fced441fac6c7904b3414 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Fri, 19 Apr 2024 12:02:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=82(app-impress)=20allow=20writing=20p?= =?UTF-8?q?ermission=20on=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allow writing permission on editor when we are not the owner to test the POC. --- .../features/pads/pad/components/BlockNoteEditor.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/frontend/apps/impress/src/features/pads/pad/components/BlockNoteEditor.tsx b/src/frontend/apps/impress/src/features/pads/pad/components/BlockNoteEditor.tsx index 973afa97..224eac53 100644 --- a/src/frontend/apps/impress/src/features/pads/pad/components/BlockNoteEditor.tsx +++ b/src/frontend/apps/impress/src/features/pads/pad/components/BlockNoteEditor.tsx @@ -1,7 +1,6 @@ import { BlockNoteEditor as BlockNoteEditorCore } from '@blocknote/core'; import { BlockNoteView } from '@blocknote/react'; import '@blocknote/react/style.css'; -import { Alert, VariantType } from '@openfun/cunningham-react'; import React, { useEffect, useMemo } from 'react'; import { WebrtcProvider } from 'y-webrtc'; @@ -57,8 +56,6 @@ export const BlockNoteContent = ({ pad, provider }: BlockNoteContentProps) => { }); }, [provider, storedEditor, userData?.email, userData?.name]); - editor.isEditable = pad.abilities.partial_update; - useEffect(() => { setEditor(pad.id, editor); }, [setEditor, pad.id, editor]); @@ -71,13 +68,6 @@ export const BlockNoteContent = ({ pad, provider }: BlockNoteContentProps) => { }; `} > - {!pad.abilities.partial_update && ( - - {`Read only, you don't have the right to update this pad.`} - - )}