diff --git a/lib/roles/auth/ldap.js b/lib/roles/auth/ldap.js index 29509427..8936ffff 100644 --- a/lib/roles/auth/ldap.js +++ b/lib/roles/auth/ldap.js @@ -50,7 +50,7 @@ module.exports = function(options) { next() }) - app.get('/partials/:name', function(req, res) { + app.get('/static/auth/ldap/views/partials/:name.html', function(req, res) { var whitelist = { 'signin': true } @@ -64,6 +64,10 @@ module.exports = function(options) { }) app.get('/', function(req, res) { + res.redirect('/auth/ldap') + }) + + app.get('/auth/ldap', function(req, res) { res.render('index') }) diff --git a/lib/roles/auth/mock.js b/lib/roles/auth/mock.js index 56eade24..55cfbf61 100644 --- a/lib/roles/auth/mock.js +++ b/lib/roles/auth/mock.js @@ -49,7 +49,7 @@ module.exports = function(options) { next() }) - app.get('/partials/:name', function(req, res) { + app.get('/static/auth/mock/views/partials/:name.html', function(req, res) { var whitelist = { 'signin': true } @@ -63,6 +63,10 @@ module.exports = function(options) { }) app.get('/', function(req, res) { + res.redirect('/auth/mock') + }) + + app.get('/auth/mock', function(req, res) { res.render('index') }) diff --git a/res/auth/ldap/scripts/routes.js b/res/auth/ldap/scripts/routes.js index d207b550..0f76c53a 100644 --- a/res/auth/ldap/scripts/routes.js +++ b/res/auth/ldap/scripts/routes.js @@ -5,12 +5,12 @@ define(['./app'], function(app) { , function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true) $routeProvider - .when('/', { - templateUrl: 'partials/signin' + .when('/auth/ldap', { + templateUrl: '/static/auth/ldap/views/signin.html' , controller: 'SignInCtrl' }) .otherwise({ - redirectTo: '/' + redirectTo: '/auth/ldap' }) } ]) diff --git a/res/auth/ldap/views/index.jade b/res/auth/ldap/views/index.jade index bfc2f2b5..d81e2601 100644 --- a/res/auth/ldap/views/index.jade +++ b/res/auth/ldap/views/index.jade @@ -7,5 +7,5 @@ html include partials/styles body(ng-cloak) div(ng-view) - script(src='/static/bower_components/requirejs/require.js', data-main='static/auth/ldap/scripts/main.js') + script(src='/static/bower_components/requirejs/require.js', data-main='/static/auth/ldap/scripts/main.js') script(src='/static/bower_components/stf-analytics/analytics.js') diff --git a/res/auth/mock/scripts/routes.js b/res/auth/mock/scripts/routes.js index d207b550..4d662281 100644 --- a/res/auth/mock/scripts/routes.js +++ b/res/auth/mock/scripts/routes.js @@ -5,12 +5,12 @@ define(['./app'], function(app) { , function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true) $routeProvider - .when('/', { - templateUrl: 'partials/signin' + .when('/auth/mock', { + templateUrl: '/static/auth/mock/views/partials/signin.html' , controller: 'SignInCtrl' }) .otherwise({ - redirectTo: '/' + redirectTo: '/auth/mock' }) } ]) diff --git a/res/auth/mock/views/index.jade b/res/auth/mock/views/index.jade index 6b6d8a0c..fc1eb1ca 100644 --- a/res/auth/mock/views/index.jade +++ b/res/auth/mock/views/index.jade @@ -7,5 +7,5 @@ html include partials/styles body(ng-cloak) div(ng-view) - script(src='/static/bower_components/requirejs/require.js', data-main='static/auth/mock/scripts/main.js') + script(src='/static/bower_components/requirejs/require.js', data-main='/static/auth/mock/scripts/main.js') script(src='/static/bower_components/stf-analytics/analytics.js')