Skip to content

Commit 58689bb

Browse files
committed
admins are also product_owners
1 parent c4153f8 commit 58689bb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ qx.Class.define("osparc.data.Permissions", {
324324
},
325325

326326
isProductOwner: function() {
327-
return this.getRole() === "product_owner";
327+
return ["admin", "product_owner"].includes(this.getRole());
328328
},
329329

330330
isAdmin: function() {
331-
return this.getRole() === "admin";
331+
return ["admin"].includes(this.getRole());
332332
},
333333
}
334334
});

services/static-webserver/client/source/class/osparc/navigation/UserMenu.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ qx.Class.define("osparc.navigation.UserMenu", {
144144
this.getChildControl("log-in");
145145
} else {
146146
this.getChildControl("user-center");
147-
if (osparc.data.Permissions.getInstance().isAdmin()) {
148-
this.getChildControl("admin-center");
147+
if (osparc.data.Permissions.getInstance().isTester()) {
148+
this.getChildControl("tester-center");
149149
}
150150
if (osparc.data.Permissions.getInstance().isProductOwner()) {
151151
this.getChildControl("po-center");
152152
}
153-
if (osparc.data.Permissions.getInstance().isTester()) {
154-
this.getChildControl("tester-center");
153+
if (osparc.data.Permissions.getInstance().isAdmin()) {
154+
this.getChildControl("admin-center");
155155
}
156156
if (osparc.desktop.credits.Utils.areWalletsEnabled()) {
157157
this.getChildControl("billing-center");

0 commit comments

Comments
 (0)