Skip to content

Commit 7ce30af

Browse files
committed
intro text depends on role
1 parent 857ec4a commit 7ce30af

File tree

1 file changed

+9
-5
lines changed
  • services/static-webserver/client/source/class/osparc/desktop/organizations

1 file changed

+9
-5
lines changed

services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
7979

8080
members: {
8181
__currentOrg: null,
82+
__introLabel: null,
8283
__memberInvitation: null,
8384
__membersModel: null,
8485

@@ -91,9 +92,7 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
9192
},
9293

9394
__createIntroText: function() {
94-
const msg = this.tr("If you are a manager or administrator, you can add new members and promote or demote existing ones.");
95-
const intro = new qx.ui.basic.Label().set({
96-
value: msg,
95+
const intro = this.__introLabel = new qx.ui.basic.Label().set({
9796
alignX: "left",
9897
rich: true,
9998
font: "text-13"
@@ -105,7 +104,6 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
105104
const hBox = this.__memberInvitation = new qx.ui.container.Composite(new qx.ui.layout.HBox(10).set({
106105
alignY: "middle"
107106
}));
108-
hBox.exclude();
109107

110108
const userEmail = new qx.ui.form.TextField().set({
111109
required: true,
@@ -217,8 +215,14 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
217215

218216
const canIWrite = orgModel.getAccessRights().getWrite();
219217
const canIDelete = orgModel.getAccessRights().getDelete();
218+
219+
const introText = canIWrite ?
220+
this.tr("You can add new members and promote or demote existing ones.") :
221+
this.tr("You can't add new members to this Organization. Please contact an Administrator or Manager.");
222+
this.__introLabel.setValue(introText);
223+
220224
this.__memberInvitation.set({
221-
visibility: canIWrite ? "visible" : "excluded"
225+
enabled: canIWrite
222226
});
223227

224228
const params = {

0 commit comments

Comments
 (0)