Skip to content

Commit

Permalink
🐛 [Frontend] TIP: Hide Boot Options (#6316)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Sep 9, 2024
1 parent 4d70330 commit 1c918c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,10 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {

__getServicesBootOptionsPage: function() {
const resourceData = this.__resourceData;
if (osparc.utils.Resources.isService(resourceData)) {
if (
osparc.utils.Resources.isService(resourceData) ||
!osparc.data.Permissions.getInstance().canDo("study.node.bootOptions.read")
) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ qx.Class.define("osparc.data.Permissions", {
"study.node.data.push",
"study.node.data.delete",
"study.node.export",
"study.node.bootOptions.read",
"study.edge.create",
"study.edge.delete",
"study.classifier",
Expand Down Expand Up @@ -153,6 +154,7 @@ qx.Class.define("osparc.data.Permissions", {
fromUserToTester = [
"dashboard.templates.read",
"dashboard.services.read",
"study.node.bootOptions.read",
"study.slides.edit",
"study.slides.stop"
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,14 @@ qx.Class.define("osparc.desktop.WorkbenchView", {

this.__serviceOptionsPage.bind("width", vBox, "width");

// HEADER
const nodeMetadata = node.getMetaData();
const version = osparc.service.Utils.getVersionDisplay(nodeMetadata["key"], nodeMetadata["version"]);
const header = new qx.ui.basic.Label(`${nodeMetadata["name"]} ${version}`).set({
paddingLeft: 5
});
vBox.add(header);

// INPUTS FORM
if (node.isPropertyInitialized("propsForm") && node.getPropsForm()) {
const inputsForm = node.getPropsForm();
Expand Down

0 comments on commit 1c918c2

Please sign in to comment.