aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-15 18:22:14 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-15 18:22:14 -0400
commit163e1f579d5a6b111645953b12e665839694585c (patch)
tree841ec3731b72b3161d0cc3ba9eaf80e331f1e942 /src/client/views/nodes/DocumentView.tsx
parent182aef3ef47a3005e1b8a60bad8195769ce07733 (diff)
fixed testAcl. added testReadonly
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 8a067b806..d1877c3a0 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -700,9 +700,15 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
this.dataDoc.author = this.props.Document.author = "ADMIN";
this.dataDoc.ACL = this.props.Document.ACL = acl;
DocListCast(this.dataDoc[Doc.LayoutFieldKey(this.dataDoc)]).map(d => {
- if (d.author === Doc.CurrentUserEmail) d.ACL = acl;
+ if (d.author === Doc.CurrentUserEmail) {
+ d.author = "ADMIN";
+ d.ACL = acl;
+ }
const data = d[DataSym];
- if (data && data.author === Doc.CurrentUserEmail) data.ACL = acl;
+ if (data && data.author === Doc.CurrentUserEmail) {
+ data.author = "ADMIN";
+ data.ACL = acl;
+ }
});
}
@@ -770,6 +776,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
moreItems.push({ description: "Make Read Only", event: () => this.setAcl("readOnly"), icon: "concierge-bell" });
moreItems.push({ description: "Make Private", event: () => this.setAcl("ownerOnly"), icon: "concierge-bell" });
moreItems.push({ description: "Test Private", event: () => this.testAcl("ownerOnly"), icon: "concierge-bell" });
+ moreItems.push({ description: "Test Readonly", event: () => this.testAcl("readOnly"), icon: "concierge-bell" });
moreItems.push({ description: "Make View of Metadata Field", event: () => Doc.MakeMetadataFieldTemplate(this.props.Document, this.props.DataDoc), icon: "concierge-bell" });
moreItems.push({ description: `${this.Document._chromeStatus !== "disabled" ? "Hide" : "Show"} Chrome`, event: () => this.Document._chromeStatus = (this.Document._chromeStatus !== "disabled" ? "disabled" : "enabled"), icon: "project-diagram" });
moreItems.push({ description: this.Document.lockedPosition ? "Unlock Position" : "Lock Position", event: this.toggleLockPosition, icon: BoolCast(this.Document.lockedPosition) ? "unlock" : "lock" });