refactor: remove privileges in favor of SNJS protections

This commit is contained in:
Baptiste Grob
2021-01-18 13:40:10 +01:00
parent 75f02b4a05
commit 42a7cb418c
12 changed files with 30 additions and 434 deletions

View File

@@ -217,7 +217,7 @@ export class AppState {
}
}
async openEditor(noteUuid: string) {
async openEditor(noteUuid: string): Promise<void> {
if (this.getActiveEditor()?.note?.uuid === noteUuid) {
return;
}
@@ -226,7 +226,7 @@ export class AppState {
if (!note) {
console.warn('Tried accessing a non-existant note of UUID ' + noteUuid);
return;
};
}
if (await this.application.authorizeNoteAccess(note)) {
const activeEditor = this.getActiveEditor();