diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-15 12:28:54 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-15 12:28:54 +0530 |
| commit | 6ec59f8aa943350a697f35c1cd428166c1b346d0 (patch) | |
| tree | 0f610f9630d64532d50be0a891bb9c738aeadc54 /src/fields | |
| parent | 5b4b916b2700da746c12754ba3238eb1f3bbf5f7 (diff) | |
| parent | 49db347deac85eb3ea3c1e4297758cd6b18e0225 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/fields')
| -rw-r--r-- | src/fields/Doc.ts | 5 | ||||
| -rw-r--r-- | src/fields/ScriptField.ts | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index ea53bc9a2..5f5fe98bc 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -781,6 +781,7 @@ export namespace Doc { if (doc) { const delegate = new Doc(id, true); delegate.proto = doc; + delegate.author = Doc.CurrentUserEmail; title && (delegate.title = title); return delegate; } @@ -790,7 +791,9 @@ export namespace Doc { let _applyCount: number = 0; export function ApplyTemplate(templateDoc: Doc) { if (templateDoc) { - const target = Doc.MakeDelegate(new Doc()); + const proto = new Doc(); + proto.author = Doc.CurrentUserEmail; + const target = Doc.MakeDelegate(proto); const targetKey = StrCast(templateDoc.layoutKey, "layout"); const applied = ApplyTemplateTo(templateDoc, target, targetKey, templateDoc.title + "(..." + _applyCount++ + ")"); target.layoutKey = targetKey; diff --git a/src/fields/ScriptField.ts b/src/fields/ScriptField.ts index 9391f56ac..1fb71fefb 100644 --- a/src/fields/ScriptField.ts +++ b/src/fields/ScriptField.ts @@ -98,6 +98,7 @@ export class ScriptField extends ObjectField { if (script?.options.capturedVariables) { const doc = Doc.assign(new Doc, script.options.capturedVariables); + doc.system = true; this.captures = new ProxyField(doc); } this.setterscript = setterscript; |
