aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-21 16:02:53 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-21 16:02:53 -0400
commit12dd45618c0dc595b8e6663bf8d3635dd7161306 (patch)
treef5687bd05c3e015a0d73d6e1cbac8f590b4fe117 /src/client/documents
parentb4b817585995b4ce504564cb0601f34ed86fc4db (diff)
fixed compile warnings
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/Documents.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 657ba521b..e2569ec70 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -550,7 +550,9 @@ export namespace Docs {
const dataDoc = MakeDataDelegate(proto, protoProps, data, fieldKey);
const viewDoc = Doc.MakeDelegate(dataDoc, delegId);
- // so that the list of annotations is already initialised, prevents issues in addonly
+ // so that the list of annotations is already initialised, prevents issues in addonly.
+ // without this, if a doc has no annotations but the user has AddOnly privileges, they won't be able to add an annotation because they would have needed to create the field's list which they don't have permissions to do.
+
dataDoc[fieldKey + "-annotations"] = new List<Doc>();
proto.links = ComputedField.MakeFunction("links(self)");