diff options
author | monikahedman <monika_hedman@brown.edu> | 2019-08-21 17:22:05 -0400 |
---|---|---|
committer | monikahedman <monika_hedman@brown.edu> | 2019-08-21 17:22:05 -0400 |
commit | 55ae5df54051d8a0bcc341d51ea7e998635722a6 (patch) | |
tree | dd910f79a5e9cc522d52b7d0f4194f697dcfd0da /src/new_fields/util.ts | |
parent | 6604c40d02b4dd7c6a6c663f301bcaedfee6998f (diff) | |
parent | 43d731ef2a6b2bd3fcdb7dd26fb6a8beac8e1306 (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) { |