diff options
author | eeng5 <eleanor_eng@brown.edu> | 2019-08-23 14:43:53 -0400 |
---|---|---|
committer | eeng5 <eleanor_eng@brown.edu> | 2019-08-23 14:43:53 -0400 |
commit | 77487a00589f216b6dbdd764f646c599f9b17ae9 (patch) | |
tree | ead6ea0caa70f5cbf3bedb459f82f30ef51e6f2c /src/new_fields/util.ts | |
parent | 601c8d2b0b8197e324f9cbadf525fe03fac5b345 (diff) | |
parent | b421b50ccc5fd481b40a42945088bb51156fe499 (diff) |
pulled from master
Diffstat (limited to 'src/new_fields/util.ts')
-rw-r--r-- | src/new_fields/util.ts | 3 |
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) { |