Set permissions to docInfo (use put_Permissions).

This commit is contained in:
Julia Radzhabova 2017-10-18 15:25:12 +03:00
parent 09d019fa87
commit 6d64d2b9a5
11 changed files with 11 additions and 0 deletions

View file

@ -97,6 +97,7 @@ var ApplicationController = new(function(){
docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(permissions);
if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);

View file

@ -319,6 +319,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
// docInfo.put_Review(this.permissions.review);
// docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); // used in sdk for testing
}

View file

@ -227,6 +227,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
}
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));

View file

@ -98,6 +98,7 @@ var ApplicationController = new(function(){
docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(permissions);
if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);

View file

@ -107,6 +107,7 @@ require([
docInfo.put_VKey(data.vkey);
docInfo.put_Options(data.options);
docInfo.put_Token(data.token);
docInfo.put_Permissions( data.doc.permissions);
}
api.preloadReporter(data);

View file

@ -313,6 +313,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
//docInfo.put_OfflineApp(this.editorConfig.nativeApp === true);
}

View file

@ -108,6 +108,7 @@ require([
docInfo.put_VKey(data.vkey);
docInfo.put_Options(data.options);
docInfo.put_Token(data.token);
docInfo.put_Permissions( data.doc.permissions);
}
api.preloadReporter(data);

View file

@ -231,6 +231,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
}
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));

View file

@ -96,6 +96,7 @@ var ApplicationController = new(function(){
docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(permissions);
if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);

View file

@ -348,6 +348,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
this.headerView.setDocumentCaption(data.doc.title);
}

View file

@ -234,6 +234,7 @@ define([
docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(this.permissions);
}
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));