Jelajahi Sumber

[core] Revert login required global callback on ajax success

Enrico Berti 10 tahun lalu
induk
melakukan
3bc097ec4a
1 mengubah file dengan 0 tambahan dan 7 penghapusan
  1. 0 7
      desktop/core/src/desktop/templates/common_header.mako

+ 0 - 7
desktop/core/src/desktop/templates/common_header.mako

@@ -206,13 +206,6 @@ from django.utils.translation import ugettext as _
         $.ajaxSetup({ cache: false });
       }
 
-      // global catch for ajax calls after the user has logged out
-      $( document ).ajaxSuccess(function( event, xhr, settings, data) {
-        if (data === '/* login required */'){
-          location.href='/accounts/login/?next=' + encodeURIComponent(window.location.pathname + window.location.search)
-        }
-      });
-
       // prevents framebusting and clickjacking
       if (self == top){
         $("body").css({