Skip to content

Commit 4eafde3

Browse files
committed
Hide Templates and Public Projects in TIP
1 parent 63d3846 commit 4eafde3

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ qx.Class.define("osparc.dashboard.ResourceBrowserFilter", {
6060
switch (this.__resourceType) {
6161
case "study": {
6262
this._add(this.__createWorkspacesAndFoldersTree());
63-
this._add(this.__createTemplates());
64-
this._add(this.__createPublicProjects());
63+
if (osparc.product.Utils.showTemplates()) {
64+
this._add(this.__createTemplates());
65+
}
66+
if (osparc.product.Utils.showPublicProjects()) {
67+
this._add(this.__createPublicProjects());
68+
}
6569
this._add(this.__createTrashBin());
6670
this._add(filtersSpacer);
6771
const scrollView = new qx.ui.container.Scroll();

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,28 @@ qx.Class.define("osparc.product.Utils", {
284284
return true;
285285
},
286286

287+
showTemplates: function() {
288+
if (osparc.data.Permissions.getInstance().isTester()) {
289+
return true;
290+
}
291+
292+
if (this.isProduct("tis") || this.isProduct("tiplite")) {
293+
return false;
294+
}
295+
return true;
296+
},
297+
298+
showPublicProjects: function() {
299+
if (osparc.data.Permissions.getInstance().isTester()) {
300+
return true;
301+
}
302+
303+
if (this.isProduct("tis") || this.isProduct("tiplite")) {
304+
return false;
305+
}
306+
return true;
307+
},
308+
287309
showQuality: function() {
288310
if (this.isProduct("osparc")) {
289311
return true;

0 commit comments

Comments
 (0)