File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ qx.Class.define("osparc.store.Tags", {
4545 tagsData . forEach ( tagData => {
4646 const tag = this . __addToCache ( tagData ) ;
4747 tags . push ( tag ) ;
48+ this . fetchAccessRights ( tag ) ;
4849 } ) ;
4950 return tags ;
5051 } ) ;
@@ -54,6 +55,10 @@ qx.Class.define("osparc.store.Tags", {
5455 return this . tagsCached ;
5556 } ,
5657
58+ getTag : function ( tagId = null ) {
59+ return this . tagsCached . find ( f => f . getTagId ( ) === tagId ) ;
60+ } ,
61+
5762 postTag : function ( newTagData ) {
5863 const params = {
5964 data : newTagData
@@ -97,8 +102,15 @@ qx.Class.define("osparc.store.Tags", {
97102 . catch ( console . error ) ;
98103 } ,
99104
100- getTag : function ( tagId = null ) {
101- return this . tagsCached . find ( f => f . getTagId ( ) === tagId ) ;
105+ fetchAccessRights : function ( tag ) {
106+ const params = {
107+ url : {
108+ "tagId" : tag . getTagId ( )
109+ }
110+ } ;
111+ osparc . data . Resources . fetch ( "tags" , "getAccessRights" , params )
112+ . then ( accessRights => tag . setAccessRights ( accessRights ) )
113+ . catch ( err => console . error ( err ) ) ;
102114 } ,
103115
104116 __addToCache : function ( tagData ) {
You can’t perform that action at this time.
0 commit comments