Revision acb284f7 snf-cyclades-app/synnefo/ui/static/snf/js/auth.js

b/snf-cyclades-app/synnefo/ui/static/snf/js/auth.js
67 67
        this.config = $.extend(this.default_config, config);
68 68
        this.current_token = undefined;
69 69
        this.current_username = undefined;
70
        this.skip_redirects = config.skip_redirects === undefined ? false : 
71
                              config.skip_redirects;
70 72
      
71 73
        var self = this;
72 74
        this.updater = window.setInterval(function(){
......
85 87
    }
86 88

  
87 89
    snf.auth.AstakosClient.prototype.delete_cookie = function() {
90
      if (!this.skip_redirects) {
88 91
        $.cookie(this.config.cookie_name, null);
92
      }
89 93
    }
90 94

  
91 95
    snf.auth.AstakosClient.prototype.redirect_to_logout = function() {
96
      if (!this.skip_redirects) {
92 97
        window.location = this.config.logout_url + "?next=";
98
      }
93 99
    }
94 100
    
95 101
    snf.auth.AstakosClient.prototype.redirect_to_login = function() {
102
      if (!this.skip_redirects) {
96 103
        window.location = this.config.login_url + "?next=" + window.location.toString();
104
      }
97 105
    }
98 106

  
99 107
    // delete cookie and redirect to logout

Also available in: Unified diff