Add 403 $location redirect to http interceptor service
This is a temporary solution to redirect any 403 responses to
a dedicated 403 'Unauthorized' page. This could occur on inital
navigation to a page or while attempting an operation.
Once permission role mapping is defined, the code should be updated
to handle 403 responses in context of user attempted actions.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ia207f2bcdd87fb20888fe6a1588d0ccd310e484c
diff --git a/app/index.js b/app/index.js
index 5997457..cbc763b 100644
--- a/app/index.js
+++ b/app/index.js
@@ -116,6 +116,8 @@
'$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$locationProvider.hashPrefix('');
+ $routeProvider.when(
+ '/unauthorized', {'template': require('./403.html')})
$routeProvider.otherwise({'redirectTo': '/login'});
}
])