Skip to content

Commit 2b20a92

Browse files
committed
replace "login" by "email"
1 parent 255a850 commit 2b20a92

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ qx.Class.define("osparc.data.model.Group", {
105105
},
106106

107107
getGroupMemberByLogin: function(userEmail) {
108-
return Object.values(this.getGroupMembers()).find(user => user.getLogin() === userEmail);
108+
return Object.values(this.getGroupMembers()).find(user => user.getEmail() === userEmail);
109109
},
110110

111111
addGroupMember: function(user) {

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ qx.Class.define("osparc.data.model.User", {
2929
this.base(arguments);
3030

3131
const label = this.self().namesToLabel(userData["first_name"], userData["last_name"]) || userData["login"];
32+
const thumbnail = this.self().emailToThumbnail(userData.login);
3233
this.set({
3334
userId: userData.id,
3435
groupId: userData.gid,
3536
label: label,
36-
login: userData.login,
37-
thumbnail: this.self().emailToThumbnail(userData.login),
37+
email: userData.login,
38+
thumbnail: thumbnail,
3839
accessRights: userData.accessRights,
3940
});
4041
},
@@ -61,11 +62,11 @@ qx.Class.define("osparc.data.model.User", {
6162
event: "changeLabel",
6263
},
6364

64-
login: {
65+
email: {
6566
check: "String",
6667
nullable: true,
6768
init: null,
68-
event: "changeLogin",
69+
event: "changeEmail",
6970
},
7071

7172
accessRights: {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
7070
if (sorted !== 0) {
7171
return sorted;
7272
}
73-
if (("login" in a) && ("login" in b)) {
74-
return a["login"].localeCompare(b["login"]);
73+
if (("email" in a) && ("email" in b)) {
74+
return a["email"].localeCompare(b["email"]);
7575
}
7676
return 0;
7777
}
@@ -156,7 +156,7 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
156156
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
157157
ctrl.bindProperty("name", "title", null, item, id);
158158
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
159-
ctrl.bindProperty("login", "subtitleMD", null, item, id);
159+
ctrl.bindProperty("email", "subtitleMD", null, item, id);
160160
ctrl.bindProperty("options", "options", null, item, id);
161161
ctrl.bindProperty("showOptions", "showOptions", null, item, id);
162162
},
@@ -233,7 +233,7 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
233233
member["groupId"] = groupMember.getGroupId();
234234
member["thumbnail"] = groupMember.getThumbnail();
235235
member["name"] = groupMember.getLabel();
236-
member["login"] = groupMember.getLogin();
236+
member["email"] = groupMember.getEmail();
237237
member["accessRights"] = groupMember.getAccessRights();
238238
let options = [];
239239
if (canIDelete) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ qx.Class.define("osparc.desktop.wallets.MembersList", {
7070
if (sorted !== 0) {
7171
return sorted;
7272
}
73-
if (("login" in a) && ("login" in b)) {
74-
return a["login"].localeCompare(b["login"]);
73+
if (("email" in a) && ("email" in b)) {
74+
return a["email"].localeCompare(b["email"]);
7575
}
7676
return 0;
7777
}
@@ -172,7 +172,7 @@ qx.Class.define("osparc.desktop.wallets.MembersList", {
172172
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
173173
ctrl.bindProperty("name", "title", null, item, id);
174174
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
175-
ctrl.bindProperty("login", "subtitleMD", null, item, id);
175+
ctrl.bindProperty("email", "subtitleMD", null, item, id);
176176
ctrl.bindProperty("options", "options", null, item, id);
177177
ctrl.bindProperty("showOptions", "showOptions", null, item, id);
178178
},
@@ -223,7 +223,7 @@ qx.Class.define("osparc.desktop.wallets.MembersList", {
223223
collaborator["groupId"] = collab.getGroupId();
224224
collaborator["thumbnail"] = collab.getThumbnail();
225225
collaborator["name"] = collab.getLabel();
226-
collaborator["login"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getLogin();
226+
collaborator["email"] = gid === myGroupId ? osparc.auth.Data.getInstance().getEmail() : collab.getEmail();
227227
collaborator["accessRights"] = {
228228
read: accessRights["read"],
229229
write: accessRights["write"],

services/static-webserver/client/source/class/osparc/filter/CollaboratorToggleButton.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ qx.Class.define("osparc.filter.CollaboratorToggleButton", {
2424
});
2525

2626
let label = collaborator.getLabel();
27-
if ("getLogin" in collaborator) {
27+
if ("getEmail" in collaborator) {
2828
// user
29-
label += ` (${collaborator.getLogin()})`;
30-
this.setToolTipText(collaborator.getLogin());
29+
label += ` (${collaborator.getEmail()})`;
30+
this.setToolTipText(collaborator.getEmail());
3131
}
3232
this.setLabel(label);
3333

services/static-webserver/client/source/class/osparc/share/Collaborators.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ qx.Class.define("osparc.share.Collaborators", {
295295
ctrl.bindProperty("thumbnail", "thumbnail", null, item, id);
296296
ctrl.bindProperty("name", "title", null, item, id); // user
297297
ctrl.bindProperty("label", "title", null, item, id); // organization
298-
ctrl.bindProperty("login", "subtitleMD", null, item, id); // user
298+
ctrl.bindProperty("email", "subtitleMD", null, item, id); // user
299299
ctrl.bindProperty("description", "subtitle", null, item, id); // organization
300300
ctrl.bindProperty("resourceType", "resourceType", null, item, id); // Resource type
301301
ctrl.bindProperty("accessRights", "accessRights", null, item, id);
@@ -413,7 +413,7 @@ qx.Class.define("osparc.share.Collaborators", {
413413
if ("getUserId" in collab) {
414414
// user
415415
collaborator["name"] = collab.getLabel();
416-
collaborator["login"] = collab.getLogin();
416+
collaborator["email"] = collab.getEmail();
417417
} else {
418418
// org/group
419419
collaborator["label"] = collab.getLabel();

0 commit comments

Comments
 (0)