fixed for logged in users
This commit is contained in:
parent
a3cb728afd
commit
27f7b25677
17
js/app.js
17
js/app.js
@ -156,14 +156,14 @@ app.config([
|
|||||||
|
|
||||||
app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) {
|
app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) {
|
||||||
$rootScope.urlCrumbs = [];
|
$rootScope.urlCrumbs = [];
|
||||||
|
debugger;
|
||||||
var Crumbs = new Object();
|
var Crumbs = new Object();
|
||||||
var param;
|
var param;
|
||||||
console.log('the path', decodeURIComponent($location.$$absUrl));
|
|
||||||
Crumbs = {
|
Crumbs = {
|
||||||
absUrl: decodeURIComponent($location.$$absUrl),
|
absUrl: decodeURIComponent($location.$$absUrl),
|
||||||
url: decodeURIComponent($location.$$url),
|
url: decodeURIComponent($location.$$url),
|
||||||
path: decodeURIComponent($location.$$path),
|
path: $location.$$path,
|
||||||
params: decodeURIComponent($location.$$search),
|
params: $location.$$search,
|
||||||
};
|
};
|
||||||
if (Crumbs.url.includes('%')) {
|
if (Crumbs.url.includes('%')) {
|
||||||
param = $location.$$path;
|
param = $location.$$path;
|
||||||
@ -175,17 +175,18 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
|
|||||||
Crumbs = {
|
Crumbs = {
|
||||||
absUrl: decodeURIComponent($location.$$absUrl),
|
absUrl: decodeURIComponent($location.$$absUrl),
|
||||||
url: decodeURIComponent($location.$$url),
|
url: decodeURIComponent($location.$$url),
|
||||||
path: decodeURIComponent($location.$$path),
|
path: $location.$$path,
|
||||||
params: decodeURIComponent($location.$$search),
|
params: $location.$$search,
|
||||||
toPath: decodeURIComponent(toState.url),
|
toPath: toState.url,
|
||||||
fromPath: decodeURIComponent(fromState.url)
|
fromPath: fromState.url
|
||||||
};
|
};
|
||||||
$rootScope.urlCrumbs.push(Crumbs);
|
$rootScope.urlCrumbs.push(Crumbs);
|
||||||
console.log($rootScope.urlCrumbs);
|
|
||||||
|
|
||||||
if (requiresLogin && !Auth.isLoggedIn()) {
|
if (requiresLogin && !Auth.isLoggedIn()) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$state.go('splash-page', { 'toState': toState.name });
|
$state.go('splash-page', { 'toState': toState.name });
|
||||||
|
} else {
|
||||||
|
window.location.replace($rootScope.urlCrumbs[0].absUrl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
|
@ -126,6 +126,7 @@ app.controller('loginCtrl', [
|
|||||||
};
|
};
|
||||||
|
|
||||||
vm.auth = function () {
|
vm.auth = function () {
|
||||||
|
console.log('this ran');
|
||||||
var subject = vm.currentSubject;
|
var subject = vm.currentSubject;
|
||||||
var issuer = vm.issuerName;
|
var issuer = vm.issuerName;
|
||||||
return vm.newOauth3.authenticate({
|
return vm.newOauth3.authenticate({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user