fix: Comment should not appear in selection toolbar with view-only permissions. closes #6011

This commit is contained in:
Tom Moor
2023-11-16 20:36:08 -05:00
parent 1ba8e756d9
commit 6177d6f3cb
3 changed files with 10 additions and 3 deletions

View File

@@ -7,12 +7,14 @@ import { Dictionary } from "~/hooks/useDictionary";
export default function readOnlyMenuItems(
state: EditorState,
canUpdate: boolean,
dictionary: Dictionary
): MenuItem[] {
const { schema } = state;
return [
{
visible: canUpdate,
name: "comment",
tooltip: dictionary.comment,
label: dictionary.comment,