diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 0c5dca4a1c..adbc4a6d98 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -336,6 +336,8 @@ window.alert("The \"document.key\" parameter for the config object must be string. Please correct it."); return false; } + + _config.document.token = _config.token; } return true; diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 63b60ba131..b8fb4c0064 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -96,6 +96,7 @@ var ApplicationController = new(function(){ docInfo.put_Title(docConfig.title); docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); + docInfo.put_Token(docConfig.token); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index b23131073f..b7a44bdcd9 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -285,6 +285,7 @@ define([ docInfo.put_Options(data.doc.options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); + docInfo.put_Token(data.doc.token); // docInfo.put_Review(this.permissions.review); // docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); // used in sdk for testing } diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 7712307e83..2a718c69e6 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -97,6 +97,7 @@ var ApplicationController = new(function(){ docInfo.put_Title(docConfig.title); docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); + docInfo.put_Token(docConfig.token); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 6b530a4bf0..3b0902b508 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -273,6 +273,7 @@ define([ docInfo.put_Options(data.doc.options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); + docInfo.put_Token(data.doc.token); //docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); } diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 4da6632717..30924a817c 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -95,6 +95,7 @@ var ApplicationController = new(function(){ docInfo.put_Title(docConfig.title); docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); + docInfo.put_Token(docConfig.token); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index d0c371a1f2..90590058d4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -307,6 +307,7 @@ define([ docInfo.put_Options(data.doc.options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); + docInfo.put_Token(data.doc.token); this.headerView.setDocumentCaption(data.doc.title); }