Skip to content

Commit 7185458

Browse files
authored
🎨 [Frontend] Enable/disable Create Functions (#7714)
1 parent 973d6f4 commit 7185458

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,10 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
839839
},
840840

841841
__getCreateFunctionsPage: function() {
842+
if (osparc.utils.DisabledPlugins.isFunctionsDisabled()) {
843+
return null;
844+
}
845+
842846
if (!osparc.utils.Resources.isStudy(this.__resourceData)) {
843847
return null;
844848
}

services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ qx.Class.define("osparc.utils.DisabledPlugins", {
2828
SCICRUNCH: "WEBSERVER_SCICRUNCH",
2929
VERSION_CONTROL: "WEBSERVER_VERSION_CONTROL",
3030
META_MODELING: "WEBSERVER_META_MODELING",
31+
FUNCTIONS: "WEBSERVER_FUNCTIONS",
3132
LICENSES: "WEBSERVER_LICENSES",
3233

3334
isExportDisabled: function() {
@@ -48,6 +49,10 @@ qx.Class.define("osparc.utils.DisabledPlugins", {
4849
return this.__isPluginDisabled(this.META_MODELING);
4950
},
5051

52+
isFunctionsDisabled: function() {
53+
return this.__isPluginDisabled(this.FUNCTIONS);
54+
},
55+
5156
isLicensesDisabled: function() {
5257
return this.__isPluginDisabled(this.LICENSES);
5358
},

0 commit comments

Comments
 (0)