Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
if (!osparc.desktop.credits.Utils.areWalletsEnabled()) {
return;
}
if (osparc.utils.Resources.isStudyLike(this.__resourceData) && !osparc.data.model.Study.canIWrite(this.__resourceData["accessRights"])) {
return;
}

const resourceData = this.__resourceData;
if (osparc.utils.Resources.isStudy(resourceData)) {
Expand Down Expand Up @@ -634,6 +637,10 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
},

__addPermissionsPage: function() {
if (osparc.utils.Resources.isStudyLike(this.__resourceData) && !osparc.data.model.Study.canIWrite(this.__resourceData["accessRights"]) ) {
return;
}

const id = "Permissions";
const title = this.tr("Sharing");
const iconSrc = "@FontAwesome5Solid/share-alt/22";
Expand Down Expand Up @@ -779,6 +786,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
if (osparc.utils.Resources.isService(resourceData)) {
return;
}
if (osparc.utils.Resources.isStudyLike(this.__resourceData) && !osparc.data.model.Study.canIWrite(this.__resourceData["accessRights"]) ) {
return;
}

const id = "ServicesUpdate";
const title = this.tr("Services Updates");
Expand Down Expand Up @@ -813,6 +823,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
) {
return;
}
if (osparc.utils.Resources.isStudyLike(this.__resourceData) && !osparc.data.model.Study.canIWrite(this.__resourceData["accessRights"]) ) {
return;
}

const id = "ServicesBootOptions";
const title = this.tr("Boot Options");
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ qx.Class.define("osparc.po.POCenter", {
this.__addPreRegistrationPage();
this.__addInvitationsPage();
this.__addProductPage();
this.__addMsgTemplatesPage();
},

members: {
Expand Down Expand Up @@ -69,12 +68,5 @@ qx.Class.define("osparc.po.POCenter", {
const productInfo = new osparc.po.ProductInfo();
this.addTab(title, iconSrc, productInfo);
},

__addMsgTemplatesPage: function() {
const title = this.tr("Message Templates");
const iconSrc = "@FontAwesome5Solid/envelope-open/22";
const productInfo = new osparc.po.MessageTemplates();
this.addTab(title, iconSrc, productInfo);
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ qx.Class.define("osparc.utils.Resources", {
return ((hypertoolData["resourceType"] === "hypertool") && ("uuid" in hypertoolData));
},

isStudyLike: function(resourceData) {
return this.isStudy(resourceData) || this.isTemplate(resourceData) || this.isTutorial(resourceData) || this.isHypertool(resourceData);
},

isFunction: function(functionData) {
return ((functionData["resourceType"] === "function") && ("uuid" in functionData));
},
Expand Down
Loading