From 27e9d7a493974575577fc73e7b653656de5990c2 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 11 Aug 2014 10:40:31 +0200 Subject: [PATCH] fix #341 --- app/coffee/modules/projects/main.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/projects/main.coffee b/app/coffee/modules/projects/main.coffee index 328babd1..85c0b8b9 100644 --- a/app/coffee/modules/projects/main.coffee +++ b/app/coffee/modules/projects/main.coffee @@ -12,9 +12,12 @@ class ProjectNavController extends taiga.Controller module.controller("ProjectNavController", ProjectNavController) class ProjectsController extends taiga.Controller - @.$inject = ["$scope", "$tgResources", "$rootScope", "$tgNavUrls"] + @.$inject = ["$scope", "$tgResources", "$rootScope", "$tgNavUrls", "$tgAuth", "$location"] + + constructor: (@scope, @rs, @rootscope, @navurls, $auth, $location) -> + if !$auth.isAuthenticated() + $location.path("/login") - constructor: (@scope, @rs, @rootscope, @navurls) -> @scope.hideMenu = true @.projects = [] @.loadInitialData()