aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-07-06 15:33:45 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-07-06 15:33:45 +0530
commitb442fc347abc267697575c517949ca0ee0dad2f1 (patch)
treefe5e0aca9dbf155196b0e8514cdcadbfc26dc36d /src/client/DocServer.ts
parent94137cb3a771ec6afd803f3cff97da86a14dd54f (diff)
parent6b24899bcf2c099163c1ca872d65b6318c11a53b (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into grid_view_secondary
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) {