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

@@ -5,6 +5,7 @@ import {
RemoteSession,
SessionStrings,
UuidString,
isNullOrUndefined,
} from '@standardnotes/snjs';
import { autorun, IAutorunOptions, IReactionPublic } from 'mobx';
import { render, FunctionComponent } from 'preact';
@@ -78,7 +79,9 @@ function useSessions(
setSessions(sessionsDuringRevoke);
const response = await responsePromise;
if ('error' in response) {
if (isNullOrUndefined(response)) {
setSessions(sessionsBeforeRevoke);
} else if ('error' in response) {
if (response.error?.message) {
setErrorMessage(response.error?.message);
} else {