diff options
author | andrewdkim <adkim414@gmail.com> | 2019-09-15 17:00:46 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-09-15 17:00:46 -0400 |
commit | 7dba132c37b0f4402e375d95c068a5fe31904a1f (patch) | |
tree | cd4ab0558f6b599cf685f99e542f24d86328e0cc /src/new_fields/util.ts | |
parent | c7678db105f952e7562f1b573266fb295e13cf7b (diff) | |
parent | 143d4669e764f6967d4d826b00b29912892ca637 (diff) |
new changes + pull 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) { |