diff --git a/services/static-webserver/client/source/class/osparc/share/AddCollaborators.js b/services/static-webserver/client/source/class/osparc/share/AddCollaborators.js index c4a8074e556..dea8508408f 100644 --- a/services/static-webserver/client/source/class/osparc/share/AddCollaborators.js +++ b/services/static-webserver/client/source/class/osparc/share/AddCollaborators.js @@ -31,7 +31,7 @@ qx.Class.define("osparc.share.AddCollaborators", { construct: function(serializedDataCopy) { this.base(arguments); - this.setSerializedDataCopy(serializedDataCopy); + this.__serializedDataCopy = serializedDataCopy; this._setLayout(new qx.ui.layout.VBox(5)); @@ -72,10 +72,6 @@ qx.Class.define("osparc.share.AddCollaborators", { return control || this.base(arguments, id); }, - setSerializedDataCopy: function(serializedDataCopy) { - this.__serializedDataCopy = serializedDataCopy; - }, - __buildLayout: function() { this.getChildControl("intro-text"); diff --git a/services/static-webserver/client/source/class/osparc/share/Collaborators.js b/services/static-webserver/client/source/class/osparc/share/Collaborators.js index 47b84ef84cd..57d3b53bc59 100644 --- a/services/static-webserver/client/source/class/osparc/share/Collaborators.js +++ b/services/static-webserver/client/source/class/osparc/share/Collaborators.js @@ -233,7 +233,10 @@ qx.Class.define("osparc.share.Collaborators", { }, __createAddCollaboratorSection: function() { - const addCollaborators = new osparc.share.AddCollaborators(this._serializedDataCopy); + const serializedDataCopy = osparc.utils.Utils.deepCloneObject(this._serializedDataCopy); + // pass resourceType, so that, it it's a template testers can share it with product everyone + serializedDataCopy["resourceType"] = this._resourceType; + const addCollaborators = new osparc.share.AddCollaborators(serializedDataCopy); addCollaborators.addListener("addCollaborators", e => this._addEditors(e.getData()), this); return addCollaborators; }, diff --git a/services/static-webserver/client/source/class/osparc/share/PublishTemplate.js b/services/static-webserver/client/source/class/osparc/share/PublishTemplate.js index 00cc5ac4832..6572c24a900 100644 --- a/services/static-webserver/client/source/class/osparc/share/PublishTemplate.js +++ b/services/static-webserver/client/source/class/osparc/share/PublishTemplate.js @@ -54,7 +54,6 @@ qx.Class.define("osparc.share.PublishTemplate", { font: "text-14" }); this._add(addCollaborators); - addCollaborators.setSerializedDataCopy(this.__potentialTemplateData); this._add(this.__selectedCollabs); diff --git a/services/static-webserver/client/source/class/osparc/store/Store.js b/services/static-webserver/client/source/class/osparc/store/Store.js index 4760436b0de..3e211ccfa7c 100644 --- a/services/static-webserver/client/source/class/osparc/store/Store.js +++ b/services/static-webserver/client/source/class/osparc/store/Store.js @@ -559,9 +559,15 @@ qx.Class.define("osparc.store.Store", { .then(values => { const orgs = values[0]; // array const members = values[1]; // object + const productEveryone = values[2]; // entry const potentialCollaborators = {}; orgs.forEach(org => { if (org["accessRights"]["read"]) { + // maybe because of migration script, some users have access to the product everyone group + // rely on the includeProductEveryone argument to exclude it if necessary + if (org["gid"] === productEveryone["gid"] && !includeProductEveryone) { + return; + } org["collabType"] = 1; potentialCollaborators[org["gid"]] = org; } @@ -580,7 +586,6 @@ qx.Class.define("osparc.store.Store", { "collabType": 2 }; } - const productEveryone = values[2]; // entry if (includeProductEveryone && productEveryone) { productEveryone["collabType"] = 0; potentialCollaborators[productEveryone["gid"]] = productEveryone;