File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -564,18 +564,22 @@ qx.Class.define("osparc.Application", {
564564 * Resets session and restarts
565565 */
566566 logout : function ( forcedReason ) {
567- if ( forcedReason ) {
568- osparc . FlashMessenger . getInstance ( ) . logAs ( forcedReason , "WARNING" , 0 ) ;
569- } else {
570- osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "You are logged out" ) , "INFO" ) ;
571- }
572567 const isLoggedIn = osparc . auth . Manager . getInstance ( ) . isLoggedIn ( ) ;
573568 if ( isLoggedIn ) {
574569 osparc . auth . Manager . getInstance ( ) . logout ( )
575- . finally ( ( ) => this . __closeAllAndToLoginPage ( ) ) ;
570+ . finally ( ( ) => this . __loggedOut ( forcedReason ) ) ;
571+ } else {
572+ this . __loggedOut ( forcedReason ) ;
573+ }
574+ } ,
575+
576+ __loggedOut : function ( forcedReason ) {
577+ if ( forcedReason ) {
578+ osparc . FlashMessenger . getInstance ( ) . logAs ( forcedReason , "WARNING" , 0 ) ;
576579 } else {
577- this . __closeAllAndToLoginPage ( ) ;
580+ osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "You are logged out" ) , "INFO" ) ;
578581 }
582+ this . __closeAllAndToLoginPage ( ) ;
579583 } ,
580584
581585 __closeAllAndToLoginPage : function ( ) {
You can’t perform that action at this time.
0 commit comments