File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
services/static-webserver/client/source/class/osparc
desktop/preferences/pages Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ qx.Class.define("osparc.desktop.preferences.pages.TagsPage", {
3232 members : {
3333 __tagsContainer : null ,
3434
35- __renderLayout : function ( ) {
35+ __renderLayout : async function ( ) {
3636 // Tags
3737 this . __tagsContainer = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 10 ) ) ;
3838 this . __tagsContainer . set ( {
@@ -44,6 +44,9 @@ qx.Class.define("osparc.desktop.preferences.pages.TagsPage", {
4444 } ) ;
4545
4646 const tags = osparc . store . Tags . getInstance ( ) . getTags ( ) ;
47+ for ( const tag of tags ) {
48+ await osparc . store . Tags . getInstance ( ) . fetchAccessRights ( tag ) ;
49+ }
4750 const tagItems = tags . map ( tag => new osparc . form . tag . TagItem ( ) . set ( { tag} ) ) ;
4851 tagItems . forEach ( tagItem => {
4952 this . __tagsContainer . add ( tagItem ) ;
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ qx.Class.define("osparc.store.Tags", {
4545 tagsData . forEach ( tagData => {
4646 const tag = this . __addToCache ( tagData ) ;
4747 tags . push ( tag ) ;
48- this . fetchAccessRights ( tag ) ;
4948 } ) ;
5049 return tags ;
5150 } ) ;
@@ -106,7 +105,11 @@ qx.Class.define("osparc.store.Tags", {
106105 . catch ( console . error ) ;
107106 } ,
108107
109- fetchAccessRights : function ( tag ) {
108+ fetchAccessRights : function ( tag , reload = false ) {
109+ if ( reload === false && tag . getAccessRights ( ) !== null ) {
110+ return new Promise ( resolve => resolve ( ) ) ;
111+ }
112+
110113 const params = {
111114 url : {
112115 "tagId" : tag . getTagId ( )
You can’t perform that action at this time.
0 commit comments