@@ -190,16 +190,16 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
190190 position : "bottom-right"
191191 } ) ;
192192
193- const accessRights = this . getAccessRights ( ) ;
194- let currentRole = this . __getRoleInfo ( "read" ) ;
195- if ( this . self ( ) . canDelete ( accessRights ) ) {
196- currentRole = this . __getRoleInfo ( "delete" ) ;
197- } else if ( this . self ( ) . canWrite ( accessRights ) ) {
198- currentRole = this . __getRoleInfo ( "write" ) ;
193+ const collabAccessRights = this . getAccessRights ( ) ;
194+ let collabCurrentRole = this . __getRoleInfo ( "read" ) ;
195+ if ( this . self ( ) . canDelete ( collabAccessRights ) ) {
196+ collabCurrentRole = this . __getRoleInfo ( "delete" ) ;
197+ } else if ( this . self ( ) . canWrite ( collabAccessRights ) ) {
198+ collabCurrentRole = this . __getRoleInfo ( "write" ) ;
199199 }
200200
201201 // promote/demote actions
202- switch ( currentRole . id ) {
202+ switch ( collabCurrentRole . id ) {
203203 case "read" : {
204204 const promoteButton = new qx . ui . menu . Button ( this . tr ( `Promote to ${ this . __getRoleInfo ( "write" ) . label } ` ) ) ;
205205 promoteButton . addListener ( "execute" , ( ) => {
@@ -249,7 +249,7 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
249249 menu . addSeparator ( ) ;
250250 }
251251
252- const removeButton = new qx . ui . menu . Button ( this . tr ( `Remove ${ currentRole . label } ` ) ) . set ( {
252+ const removeButton = new qx . ui . menu . Button ( this . tr ( `Remove ${ collabCurrentRole . label } ` ) ) . set ( {
253253 textColor : "danger-red"
254254 } ) ;
255255 removeButton . addListener ( "execute" , ( ) => {
0 commit comments