Skip to content

Commit 974abac

Browse files
committed
minor fix
1 parent 082410c commit 974abac

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

services/static-webserver/client/source/class/osparc/ui/list/CollaboratorListItem.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,17 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
213213
}
214214
case "write": {
215215
const resource = this.getResourceType();
216-
const promoteButton = new qx.ui.menu.Button(this.tr(`Promote to ${this.__getRoleInfo("delete").label}`));
217-
promoteButton.setVisibility(resource === "service" ? "excluded" : "visible");
218-
promoteButton.addListener("execute", () => {
219-
this.fireDataEvent("promoteToOwner", {
220-
gid: this.getKey(),
221-
name: this.getTitle()
216+
if (resource !== "service") {
217+
// there is no owner role for services
218+
const promoteButton = new qx.ui.menu.Button(this.tr(`Promote to ${this.__getRoleInfo("delete").label}`));
219+
promoteButton.addListener("execute", () => {
220+
this.fireDataEvent("promoteToOwner", {
221+
gid: this.getKey(),
222+
name: this.getTitle()
223+
});
222224
});
223-
});
224-
menu.add(promoteButton);
225+
menu.add(promoteButton);
226+
}
225227
const demoteButton = new qx.ui.menu.Button(this.tr(`Demote to ${this.__getRoleInfo("read").label}`));
226228
demoteButton.addListener("execute", () => {
227229
this.fireDataEvent("demoteToUser", {

0 commit comments

Comments
 (0)