Merge pull request #1744 from ONLYOFFICE/fix/for-hotfix
Send permissions to sdk as is
This commit is contained in:
commit
a0b1880e8d
|
@ -98,8 +98,7 @@ DE.ApplicationController = new(function(){
|
|||
if (docConfig) {
|
||||
permissions = $.extend(permissions, docConfig.permissions);
|
||||
|
||||
var _permissions = $.extend({}, docConfig.permissions),
|
||||
docInfo = new Asc.asc_CDocInfo(),
|
||||
var docInfo = new Asc.asc_CDocInfo(),
|
||||
_user = new Asc.asc_CUserInfo();
|
||||
|
||||
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)),
|
||||
|
@ -123,7 +122,7 @@ DE.ApplicationController = new(function(){
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(config.callbackUrl);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(docConfig.permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
docInfo.put_Lang(config.lang);
|
||||
docInfo.put_Mode(config.mode);
|
||||
|
|
|
@ -472,8 +472,7 @@ define([
|
|||
if (data.doc) {
|
||||
this.permissions = $.extend(this.permissions, data.doc.permissions);
|
||||
|
||||
var _permissions = $.extend({}, data.doc.permissions),
|
||||
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.appOptions.user.id);
|
||||
|
@ -490,7 +489,7 @@ define([
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -450,8 +450,7 @@ define([
|
|||
if (data.doc) {
|
||||
this.permissions = $.extend(this.permissions, data.doc.permissions);
|
||||
|
||||
var _permissions = $.extend({}, data.doc.permissions),
|
||||
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.appOptions.user.id);
|
||||
|
@ -468,7 +467,7 @@ define([
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -111,7 +111,6 @@ class MainController extends Component {
|
|||
if (data.doc) {
|
||||
this.permissions = Object.assign(this.permissions, data.doc.permissions);
|
||||
|
||||
const _permissions = Object.assign({}, data.doc.permissions);
|
||||
const _userOptions = this.props.storeAppOptions.user;
|
||||
const _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(_userOptions.id);
|
||||
|
@ -128,7 +127,7 @@ class MainController extends Component {
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -96,8 +96,7 @@ PE.ApplicationController = new(function(){
|
|||
if (docConfig) {
|
||||
permissions = $.extend(permissions, docConfig.permissions);
|
||||
|
||||
var _permissions = $.extend({}, docConfig.permissions),
|
||||
docInfo = new Asc.asc_CDocInfo(),
|
||||
var docInfo = new Asc.asc_CDocInfo(),
|
||||
_user = new Asc.asc_CUserInfo();
|
||||
|
||||
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)),
|
||||
|
@ -121,7 +120,7 @@ PE.ApplicationController = new(function(){
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(config.callbackUrl);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(docConfig.permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
docInfo.put_Lang(config.lang);
|
||||
docInfo.put_Mode(config.mode);
|
||||
|
|
|
@ -407,8 +407,7 @@ define([
|
|||
if (data.doc) {
|
||||
this.permissions = $.extend(this.permissions, data.doc.permissions);
|
||||
|
||||
var _permissions = $.extend({}, data.doc.permissions),
|
||||
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.appOptions.user.id);
|
||||
|
@ -425,7 +424,7 @@ define([
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -103,7 +103,6 @@ class MainController extends Component {
|
|||
if (data.doc) {
|
||||
this.permissions = Object.assign(this.permissions, data.doc.permissions);
|
||||
|
||||
const _permissions = Object.assign({}, data.doc.permissions);
|
||||
const _user = new Asc.asc_CUserInfo();
|
||||
const _userOptions = this.props.storeAppOptions.user;
|
||||
_user.put_Id(_userOptions.id);
|
||||
|
@ -120,7 +119,7 @@ class MainController extends Component {
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -103,8 +103,7 @@ SSE.ApplicationController = new(function(){
|
|||
if (docConfig) {
|
||||
permissions = $.extend(permissions, docConfig.permissions);
|
||||
|
||||
var _permissions = $.extend({}, docConfig.permissions),
|
||||
docInfo = new Asc.asc_CDocInfo(),
|
||||
var docInfo = new Asc.asc_CDocInfo(),
|
||||
_user = new Asc.asc_CUserInfo();
|
||||
|
||||
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)),
|
||||
|
@ -128,7 +127,7 @@ SSE.ApplicationController = new(function(){
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(config.callbackUrl);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(docConfig.permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
docInfo.put_Lang(config.lang);
|
||||
docInfo.put_Mode(config.mode);
|
||||
|
|
|
@ -480,8 +480,7 @@ define([
|
|||
if (data.doc) {
|
||||
this.permissions = _.extend(this.permissions, data.doc.permissions);
|
||||
|
||||
var _permissions = $.extend({}, data.doc.permissions),
|
||||
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
|
||||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.appOptions.user.id);
|
||||
|
@ -498,7 +497,7 @@ define([
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
|
@ -149,8 +149,7 @@ class MainController extends Component {
|
|||
if ( data.doc ) {
|
||||
this.permissions = Object.assign(this.permissions, data.doc.permissions);
|
||||
|
||||
let _permissions = Object.assign({}, data.doc.permissions),
|
||||
_user = new Asc.asc_CUserInfo();
|
||||
let _user = new Asc.asc_CUserInfo();
|
||||
const _userOptions = this.props.storeAppOptions.user;
|
||||
|
||||
_user.put_Id(_userOptions.id);
|
||||
|
@ -167,7 +166,7 @@ class MainController extends Component {
|
|||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_Permissions(data.doc.permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
|
Loading…
Reference in a new issue