diff options
author | bobzel <zzzman@gmail.com> | 2020-08-02 09:22:38 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-02 09:22:38 -0400 |
commit | 63fd10d0940331d68a9ce58b4b77734b11e393f5 (patch) | |
tree | 62f9aba141a38d229c238c20f491d75720324591 /src/fields/util.ts | |
parent | 4792b8875f27770882943c8dc0ef021d22a37c06 (diff) |
fixed hiding of close button based on permsisions.
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r-- | src/fields/util.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts index d6d9718f2..957b2c8cd 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -10,6 +10,7 @@ import { DocServer } from "../client/DocServer"; import { ComputedField } from "./ScriptField"; import { ScriptCast, StrCast } from "./Types"; import { returnZero } from "../Utils"; +import { addSyntheticLeadingComment } from "typescript"; function _readOnlySetter(): never { @@ -155,6 +156,7 @@ export enum SharingPermissions { * Calculates the effective access right to a document for the current user. */ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number): symbol { + if (!target) return AclPrivate; if (in_prop === UpdatingFromServer || target[UpdatingFromServer]) return AclAdmin; if (target[AclSym] && Object.keys(target[AclSym]).length) { |