From 564af078a8280c77ed6ae04c66375c9dd54431a3 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Thu, 4 Oct 2012 16:34:16 -0700 Subject: [PATCH] Remove old AuthHelpers class. --- template/app/controller/AuthHelpers.js | 41 -------------------------- 1 file changed, 41 deletions(-) delete mode 100644 template/app/controller/AuthHelpers.js diff --git a/template/app/controller/AuthHelpers.js b/template/app/controller/AuthHelpers.js deleted file mode 100644 index d5f7d9c5..00000000 --- a/template/app/controller/AuthHelpers.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * A mixin for Comments controller to help with authentication. - */ -Ext.define('Docs.controller.AuthHelpers', { - - /** - * Performs request to the comments server. - * - * Works as if calling Ext.Ajax.request or Ext.data.JsonP.request - * directly, but prefixes the URL with docs base URL and database - * name and adds Session ID. - * - * @param {String} proxy Should we perform "ajax" or "jsonp" request. - * @param {Object} config - * @protected - */ - request: function(type, config) { - config.url = this.addSid(Docs.baseUrl + '/' + Docs.commentsDb + '/' + Docs.commentsVersion + config.url); - if (type === "jsonp") { - Ext.data.JsonP.request(config); - } - else { - // Allow doing Cross Origin request. - config.cors = true; - Ext.Ajax.request(config); - } - }, - - addSid: function(url) { - var sid = this.getController('Auth').sid; - return url + (url.match(/\?/) ? '&' : '?') + 'sid=' + sid; - }, - - /** - * Returns true if user is logged in. - */ - isLoggedIn: function() { - return this.getController('Auth').isLoggedIn(); - } - -}); -- GitLab