File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
services/static-webserver/client/source/class/osparc/info Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments