summary refs log tree commit diff
path: root/webclient/app.js
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-09-01 13:29:17 +0100
committerMark Haines <mark.haines@matrix.org>2014-09-01 13:29:17 +0100
commita9512d0994bba12cd3684d37030ce68ebe9330b3 (patch)
tree6a80e8f1fa89fccf0cd90ea251edb7c1fb28224c /webclient/app.js
parentMerge branch 'develop' into server2server_tls (diff)
parentadd another public wishlist item (diff)
downloadsynapse-a9512d0994bba12cd3684d37030ce68ebe9330b3.tar.xz
Merge branch 'develop' into server2server_tls
Diffstat (limited to 'webclient/app.js')
-rw-r--r--webclient/app.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/webclient/app.js b/webclient/app.js
index 02695c3ae6..9663ddf967 100644
--- a/webclient/app.js
+++ b/webclient/app.js
@@ -18,6 +18,7 @@ var matrixWebClient = angular.module('matrixWebClient', [
     'ngRoute',
     'MatrixWebClientController',
     'LoginController',
+    'RegisterController',
     'RoomController',
     'HomeController',
     'RecentsController',
@@ -38,6 +39,10 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
                 templateUrl: 'login/login.html',
                 controller: 'LoginController'
             }).
+            when('/register', {
+                templateUrl: 'login/register.html',
+                controller: 'RegisterController'
+            }).
             when('/room/:room_id_or_alias', {
                 templateUrl: 'room/room.html',
                 controller: 'RoomController'
@@ -84,7 +89,10 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
 matrixWebClient.run(['$location', 'matrixService', function($location, matrixService) {
 
     // If user auth details are not in cache, go to the login page
-    if (!matrixService.isUserLoggedIn()) {
+    if (!matrixService.isUserLoggedIn() &&
+        $location.path() !== "/login" &&
+        $location.path() !== "/register")
+    {
         $location.path("login");
     }