@@ -37,7 +37,7 @@ qx.Class.define("osparc.data.model.Function", {
3737 inputSchema : functionData . inputSchema || this . getInputSchema ( ) ,
3838 outputSchema : functionData . outputSchema || this . getOutputSchema ( ) ,
3939 defaultInputs : functionData . defaultInputs || this . getDefaultInputs ( ) ,
40- accessRights : functionData . accessRights || this . getAccessRights ( ) ,
40+ myAccessRights : functionData . accessRights || this . getMyAccessRights ( ) ,
4141 creationDate : functionData . creationDate ? new Date ( functionData . creationDate ) : this . getCreationDate ( ) ,
4242 lastChangeDate : functionData . lastChangeDate ? new Date ( functionData . lastChangeDate ) : this . getLastChangeDate ( ) ,
4343 thumbnail : functionData . thumbnail || this . getThumbnail ( ) ,
@@ -99,10 +99,10 @@ qx.Class.define("osparc.data.model.Function", {
9999 init : { }
100100 } ,
101101
102- accessRights : {
102+ myAccessRights : {
103103 check : "Object" ,
104104 nullable : false ,
105- event : "changeAccessRights " ,
105+ event : "changeMyAccessRights " ,
106106 init : { }
107107 } ,
108108
@@ -134,20 +134,6 @@ qx.Class.define("osparc.data.model.Function", {
134134 } ,
135135 } ,
136136
137- statics : {
138- canIWrite : function ( accessRights ) {
139- const groupsStore = osparc . store . Groups . getInstance ( ) ;
140- const gIds = groupsStore . getOrganizationIds ( ) ;
141- gIds . push ( groupsStore . getMyGroupId ( ) ) ;
142- let canWrite = false ;
143- for ( let i = 0 ; i < gIds . length && ! canWrite ; i ++ ) {
144- const gid = gIds [ i ] ;
145- canWrite = ( gid in accessRights ) ? accessRights [ gid ] [ "write" ] : false ;
146- }
147- return canWrite ;
148- } ,
149- } ,
150-
151137 members : {
152138 serialize : function ( clean = true ) {
153139 let jsonObject = { } ;
0 commit comments