aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-28 01:54:07 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-28 01:54:07 -0500
commit31afe6fcaaa350f3e66ecd35637e2adea217dceb (patch)
tree36ef22fda85c62fd668ba7454209fa08daddc064 /src/client/DocServer.ts
parente5385f9421b23d4119ac8704c9d127f1f296ac54 (diff)
parent790cc785a5cad47f0dd274c7f4773eff7d7d9c2e (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_schema_view
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) {