From 9dd198ed7523d975c710e89e84ac06dcb1b52ae6 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 28 May 2014 08:11:58 +0200 Subject: [PATCH] Remove auth logic from redirect in Travis.Route Auth check in redirect duplicates beforeModel logic --- assets/scripts/app/routes.coffee | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/assets/scripts/app/routes.coffee b/assets/scripts/app/routes.coffee index 8589a8bd..12049b2d 100644 --- a/assets/scripts/app/routes.coffee +++ b/assets/scripts/app/routes.coffee @@ -23,19 +23,6 @@ Travis.Route = Ember.Route.extend signedIn: -> @controllerFor('currentUser').get('content') - redirect: -> - @auth.autoSignIn() unless @signedIn() - - if @get('needsAuth') - @authorize(@router.location.getURL()) - else - @_super.apply this, arguments - - authorize: (path) -> - if !@signedIn() - @auth.storeAfterSignInPath(path) - @transitionTo('auth') - Travis.ApplicationRoute = Travis.Route.extend init: -> @_super.apply this, arguments