From: Adam Dullage Date: Thu, 9 May 2024 20:31:15 +0000 (+0100) Subject: Prevent note edit and delete if auth type is read only X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=8a6ee5c36a87571754cad4f97ebab0bb16bbbb53;p=flatnotes.git Prevent note edit and delete if auth type is read only --- diff --git a/client/views/Note.vue b/client/views/Note.vue index 34756cf..7b45840 100644 --- a/client/views/Note.vue +++ b/client/views/Note.vue @@ -28,11 +28,13 @@
globalStore.authType != authTypes.readOnly); const editMode = ref(false); +const globalStore = useGlobalStore(); const isDeleteModalVisible = ref(false); const isNewNote = computed(() => !props.title); const loadingIndicator = ref(); @@ -110,7 +116,7 @@ const toastEditor = ref(); // 'e' to edit Mousetrap.bind("e", () => { - if (editMode.value === false) { + if (editMode.value === false && canModify.value) { editHandler(); } });