Skip to content

Commit 873b8e0

Browse files
committed
minor
1 parent d4ef75a commit 873b8e0

File tree

1 file changed

+8
-4
lines changed
  • services/static-webserver/client/source/class/osparc/info

1 file changed

+8
-4
lines changed

services/static-webserver/client/source/class/osparc/info/CommentAdd.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ qx.Class.define("osparc.info.CommentAdd", {
141141
const userGids = data["selectedGids"];
142142
if (userGids && userGids.length) {
143143
const userGid = parseInt(userGids[0]);
144-
// Note: this check only works if the project is directly shared with the user.
144+
// Note:
145+
// This check only works if the project is directly shared with the user.
145146
// If it's shared through a group, it might be a bit confusing
146-
if (userGid in this.__studyData["accessRights"]) {
147-
this.__addNotify(userGid);
148-
} else {
147+
if (
148+
!(userGid in this.__studyData["accessRights"]) &&
149+
osparc.data.model.Study.canIWrite(this.__studyData["accessRights"])
150+
) {
149151
const newCollaborators = [{
150152
userGid: osparc.data.Roles.STUDY["write"].accessRights
151153
}];
@@ -156,6 +158,8 @@ qx.Class.define("osparc.info.CommentAdd", {
156158
.catch(err => {
157159
console.error("Failed to add collaborator:", err);
158160
});
161+
} else {
162+
this.__addNotify(userGid);
159163
}
160164
}
161165
});

0 commit comments

Comments
 (0)