File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed 
services/static-webserver/client/source/class/osparc/support Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,20 @@ qx.Class.define("osparc.support.Conversation", {
179179    } , 
180180
181181    __shareProjectWithSupport : function ( e )  { 
182-       console . log ( "Share project with support: " ,  e . getData ( ) ) ; 
182+       const  share  =  e . getData ( ) ; 
183+       const  supportGroupId  =  osparc . store . Products . getInstance ( ) . getSupportGroupId ( ) ; 
184+       const  projectId  =  this . getConversation ( ) . getContextProjectId ( ) ; 
185+       osparc . store . Study . getInstance ( ) . getOne ( projectId ) 
186+         . then ( studyData  =>  { 
187+           if  ( share )  { 
188+             const  newCollaborators  =  { 
189+               [ supportGroupId ] : osparc . data . Roles . STUDY [ "write" ] . accessRights 
190+             } ; 
191+             osparc . store . Study . getInstance ( ) . addCollaborators ( studyData ,  newCollaborators ) 
192+           }  else  { 
193+             osparc . store . Study . getInstance ( ) . removeCollaborator ( studyData ,  supportGroupId ) ; 
194+           } 
195+         } ) ; 
183196    } , 
184197
185198    __reloadMessages : function ( removeMessages  =  true )  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments