aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-28 17:02:08 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-28 17:02:08 -0400
commit777030e88d177daa1f61365c22b945b8808ec61a (patch)
tree0e03fb85b8df64367b6eae36cacf42430ace408c /src/client/DocServer.ts
parentb79b5ebfd4f8ea8b4ae793e59f05b5bfe79b9b8a (diff)
parent7a78bc39fa2b005d67499bcd6baf19b9dce0eb18 (diff)
Merge branch 'master' into 3D_carousel
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index c7dfb0b23..2a7a7c59a 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -31,16 +31,19 @@ export namespace DocServer {
export enum WriteMode {
Default = 0, //Anything goes
- Playground = 1,
- LiveReadonly = 2,
- LivePlayground = 3,
+ Playground = 1, //Playground (write own/no read)
+ LiveReadonly = 2,//Live Readonly (no write/read others)
+ LivePlayground = 3,//Live Playground (write own/read others)
}
-
- export let AclsMode = WriteMode.Default;
-
const fieldWriteModes: { [field: string]: WriteMode } = {};
const docsWithUpdates: { [field: string]: Set<Doc> } = {};
+ export var PlaygroundFields: string[];
+ export function setPlaygroundFields(livePlayougroundFields: string[]) {
+ DocServer.PlaygroundFields = livePlayougroundFields;
+ livePlayougroundFields.forEach(f => DocServer.setFieldWriteMode(f, DocServer.WriteMode.LivePlayground));
+ }
+
export function setFieldWriteMode(field: string, writeMode: WriteMode) {
fieldWriteModes[field] = writeMode;
if (writeMode !== WriteMode.Playground) {