diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-17 14:49:04 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-17 14:49:04 +0100 |
commit | 7af7d18cfa2f1fab239e9a21e989bd8061cf23bb (patch) | |
tree | f11a35340c168a2a866fcf5c82c9d21d847206aa /apps/files | |
parent | add696b057fa40696c251d4a52ed9d2a997c7aa0 (diff) | |
parent | b99c6f1f67a207984b8b5355703cabd89d1e7c73 (diff) | |
download | nextcloud-server-7af7d18cfa2f1fab239e9a21e989bd8061cf23bb.tar.gz nextcloud-server-7af7d18cfa2f1fab239e9a21e989bd8061cf23bb.zip |
Merge pull request #16783 from owncloud/handle-redirects-global
Adding global error handler for ajax calls which run into redirection…
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 7 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index dd03b0c895a..81dfea2114d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1433,13 +1433,6 @@ delete this._reloadCall; this.hideMask(); - if (status === 401) { - // TODO: append current URL to be able to get back after logging in again - OC.redirect(OC.generateUrl('apps/files')); - OC.Notification.show(result); - return false; - } - // Firewall Blocked request? if (status === 403) { // Go home diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index ed56011866e..a83c8c4c0bc 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2462,13 +2462,6 @@ describe('OCA.Files.FileList tests', function() { getFolderContentsStub.restore(); fileList = undefined; }); - it('redirects to files app in case of auth error', function () { - deferredList.reject(401, 'Authentication error'); - - expect(redirectStub.calledOnce).toEqual(true); - expect(redirectStub.getCall(0).args[0]).toEqual(OC.webroot + '/index.php/apps/files'); - expect(getFolderContentsStub.calledOnce).toEqual(true); - }); it('redirects to root folder in case of forbidden access', function () { deferredList.reject(403); |