aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/util.ts
diff options
context:
space:
mode:
authorAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-08-28 21:06:02 -0400
committerAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-08-28 21:06:02 -0400
commit38c8b841dcf3f42b96b3d93e7bcc2fc6c9495613 (patch)
tree9b0773f05ff9db5b67b47da398f2c16c2511f0bb /src/new_fields/util.ts
parente03a1b2cc90e0fdb7789f4826e482e9040aa7075 (diff)
parent4b7672c75fe5cdf6afe534e67213917b24980c3e (diff)
merged, docview still weird
Diffstat (limited to 'src/new_fields/util.ts')
-rw-r--r--src/new_fields/util.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/new_fields/util.ts b/src/new_fields/util.ts
index c546e2aac..04194509c 100644
--- a/src/new_fields/util.ts
+++ b/src/new_fields/util.ts
@@ -7,7 +7,6 @@ import { ObjectField } from "./ObjectField";
import { action } from "mobx";
import { Parent, OnUpdate, Update, Id, SelfProxy, Self } from "./FieldSymbols";
import { DocServer } from "../client/DocServer";
-import { CurrentUserUtils } from "../server/authentication/models/current_user_utils";
function _readOnlySetter(): never {
throw new Error("Documents can't be modified in read-only mode");
@@ -61,7 +60,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number
}
const writeMode = DocServer.getFieldWriteMode(prop as string);
const fromServer = target[UpdatingFromServer];
- const sameAuthor = fromServer || (receiver.author === CurrentUserUtils.email);
+ const sameAuthor = fromServer || (receiver.author === Doc.CurrentUserEmail);
const writeToDoc = sameAuthor || (writeMode !== DocServer.WriteMode.LiveReadonly);
const writeToServer = sameAuthor || (writeMode === DocServer.WriteMode.Default);
if (writeToDoc) {