Merge pull request #1744 from ONLYOFFICE/fix/for-hotfix

Send permissions to sdk as is
This commit is contained in:
Julia Radzhabova 2022-05-17 11:29:21 +03:00 committed by GitHub
commit a0b1880e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 18 additions and 28 deletions

View file

@ -98,8 +98,7 @@ DE.ApplicationController = new(function(){
if (docConfig) { if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions); permissions = $.extend(permissions, docConfig.permissions);
var _permissions = $.extend({}, docConfig.permissions), var docInfo = new Asc.asc_CDocInfo(),
docInfo = new Asc.asc_CDocInfo(),
_user = new Asc.asc_CUserInfo(); _user = new Asc.asc_CUserInfo();
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), 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_UserInfo(_user);
docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_CallbackUrl(config.callbackUrl);
docInfo.put_Token(docConfig.token); docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(docConfig.permissions);
docInfo.put_EncryptedInfo(config.encryptionKeys); docInfo.put_EncryptedInfo(config.encryptionKeys);
docInfo.put_Lang(config.lang); docInfo.put_Lang(config.lang);
docInfo.put_Mode(config.mode); docInfo.put_Mode(config.mode);

View file

@ -472,8 +472,7 @@ define([
if (data.doc) { if (data.doc) {
this.permissions = $.extend(this.permissions, data.doc.permissions); this.permissions = $.extend(this.permissions, data.doc.permissions);
var _permissions = $.extend({}, data.doc.permissions), var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
var _user = new Asc.asc_CUserInfo(); var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id); _user.put_Id(this.appOptions.user.id);
@ -490,7 +489,7 @@ define([
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -450,8 +450,7 @@ define([
if (data.doc) { if (data.doc) {
this.permissions = $.extend(this.permissions, data.doc.permissions); this.permissions = $.extend(this.permissions, data.doc.permissions);
var _permissions = $.extend({}, data.doc.permissions), var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
var _user = new Asc.asc_CUserInfo(); var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id); _user.put_Id(this.appOptions.user.id);
@ -468,7 +467,7 @@ define([
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -111,7 +111,6 @@ class MainController extends Component {
if (data.doc) { if (data.doc) {
this.permissions = Object.assign(this.permissions, data.doc.permissions); this.permissions = Object.assign(this.permissions, data.doc.permissions);
const _permissions = Object.assign({}, data.doc.permissions);
const _userOptions = this.props.storeAppOptions.user; const _userOptions = this.props.storeAppOptions.user;
const _user = new Asc.asc_CUserInfo(); const _user = new Asc.asc_CUserInfo();
_user.put_Id(_userOptions.id); _user.put_Id(_userOptions.id);
@ -128,7 +127,7 @@ class MainController extends Component {
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -96,8 +96,7 @@ PE.ApplicationController = new(function(){
if (docConfig) { if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions); permissions = $.extend(permissions, docConfig.permissions);
var _permissions = $.extend({}, docConfig.permissions), var docInfo = new Asc.asc_CDocInfo(),
docInfo = new Asc.asc_CDocInfo(),
_user = new Asc.asc_CUserInfo(); _user = new Asc.asc_CUserInfo();
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), 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_UserInfo(_user);
docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_CallbackUrl(config.callbackUrl);
docInfo.put_Token(docConfig.token); docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(docConfig.permissions);
docInfo.put_EncryptedInfo(config.encryptionKeys); docInfo.put_EncryptedInfo(config.encryptionKeys);
docInfo.put_Lang(config.lang); docInfo.put_Lang(config.lang);
docInfo.put_Mode(config.mode); docInfo.put_Mode(config.mode);

View file

@ -407,8 +407,7 @@ define([
if (data.doc) { if (data.doc) {
this.permissions = $.extend(this.permissions, data.doc.permissions); this.permissions = $.extend(this.permissions, data.doc.permissions);
var _permissions = $.extend({}, data.doc.permissions), var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
var _user = new Asc.asc_CUserInfo(); var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id); _user.put_Id(this.appOptions.user.id);
@ -425,7 +424,7 @@ define([
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -103,7 +103,6 @@ class MainController extends Component {
if (data.doc) { if (data.doc) {
this.permissions = Object.assign(this.permissions, data.doc.permissions); this.permissions = Object.assign(this.permissions, data.doc.permissions);
const _permissions = Object.assign({}, data.doc.permissions);
const _user = new Asc.asc_CUserInfo(); const _user = new Asc.asc_CUserInfo();
const _userOptions = this.props.storeAppOptions.user; const _userOptions = this.props.storeAppOptions.user;
_user.put_Id(_userOptions.id); _user.put_Id(_userOptions.id);
@ -120,7 +119,7 @@ class MainController extends Component {
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -103,8 +103,7 @@ SSE.ApplicationController = new(function(){
if (docConfig) { if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions); permissions = $.extend(permissions, docConfig.permissions);
var _permissions = $.extend({}, docConfig.permissions), var docInfo = new Asc.asc_CDocInfo(),
docInfo = new Asc.asc_CDocInfo(),
_user = new Asc.asc_CUserInfo(); _user = new Asc.asc_CUserInfo();
var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), 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_UserInfo(_user);
docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_CallbackUrl(config.callbackUrl);
docInfo.put_Token(docConfig.token); docInfo.put_Token(docConfig.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(docConfig.permissions);
docInfo.put_EncryptedInfo(config.encryptionKeys); docInfo.put_EncryptedInfo(config.encryptionKeys);
docInfo.put_Lang(config.lang); docInfo.put_Lang(config.lang);
docInfo.put_Mode(config.mode); docInfo.put_Mode(config.mode);

View file

@ -480,8 +480,7 @@ define([
if (data.doc) { if (data.doc) {
this.permissions = _.extend(this.permissions, data.doc.permissions); this.permissions = _.extend(this.permissions, data.doc.permissions);
var _permissions = $.extend({}, data.doc.permissions), var _options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
_options = $.extend({}, data.doc.options, this.editorConfig.actionLink || {});
var _user = new Asc.asc_CUserInfo(); var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id); _user.put_Id(this.appOptions.user.id);
@ -498,7 +497,7 @@ define([
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);

View file

@ -149,8 +149,7 @@ class MainController extends Component {
if ( data.doc ) { if ( data.doc ) {
this.permissions = Object.assign(this.permissions, data.doc.permissions); this.permissions = Object.assign(this.permissions, data.doc.permissions);
let _permissions = Object.assign({}, data.doc.permissions), let _user = new Asc.asc_CUserInfo();
_user = new Asc.asc_CUserInfo();
const _userOptions = this.props.storeAppOptions.user; const _userOptions = this.props.storeAppOptions.user;
_user.put_Id(_userOptions.id); _user.put_Id(_userOptions.id);
@ -167,7 +166,7 @@ class MainController extends Component {
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(data.doc.permissions);
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang); docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode); docInfo.put_Mode(this.editorConfig.mode);