Skip to content

Commit de43e87

Browse files
committed
checkFunctionPermissions
1 parent 7637521 commit de43e87

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

services/static-webserver/client/source/class/osparc/data/Permissions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ qx.Class.define("osparc.data.Permissions", {
310310
return false;
311311
}
312312

313+
// This needs to be provided by the backend
314+
if (action === "readFunctions") {
315+
return true;
316+
}
317+
313318
if (
314319
this.__functionPermissions &&
315320
action in this.__functionPermissions

services/static-webserver/client/source/class/osparc/product/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ qx.Class.define("osparc.product.Utils", {
311311
},
312312

313313
showFunctions: function() {
314-
if (osparc.utils.DisabledPlugins.isFunctionsDisabled()) {
314+
if (!osparc.data.Permissions.getInstance().checkFunctionPermissions("readFunctions")) {
315315
return false;
316316
}
317317

0 commit comments

Comments
 (0)