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) {
 | 
			
		||||
  $rootScope.urlCrumbs = [];
 | 
			
		||||
  debugger;
 | 
			
		||||
  var Crumbs = new Object();
 | 
			
		||||
  var param;
 | 
			
		||||
  console.log('the path', decodeURIComponent($location.$$absUrl));
 | 
			
		||||
  Crumbs = {
 | 
			
		||||
    absUrl: decodeURIComponent($location.$$absUrl),
 | 
			
		||||
    url: decodeURIComponent($location.$$url),
 | 
			
		||||
    path: decodeURIComponent($location.$$path),
 | 
			
		||||
    params: decodeURIComponent($location.$$search),
 | 
			
		||||
    path: $location.$$path,
 | 
			
		||||
    params: $location.$$search,
 | 
			
		||||
  };
 | 
			
		||||
  if (Crumbs.url.includes('%')) {
 | 
			
		||||
    param = $location.$$path;
 | 
			
		||||
@ -175,17 +175,18 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
 | 
			
		||||
    Crumbs = {
 | 
			
		||||
      absUrl: decodeURIComponent($location.$$absUrl),
 | 
			
		||||
      url: decodeURIComponent($location.$$url),
 | 
			
		||||
      path: decodeURIComponent($location.$$path),
 | 
			
		||||
      params: decodeURIComponent($location.$$search),
 | 
			
		||||
      toPath: decodeURIComponent(toState.url),
 | 
			
		||||
      fromPath: decodeURIComponent(fromState.url)
 | 
			
		||||
      path: $location.$$path,
 | 
			
		||||
      params: $location.$$search,
 | 
			
		||||
      toPath: toState.url,
 | 
			
		||||
      fromPath: fromState.url
 | 
			
		||||
    };
 | 
			
		||||
    $rootScope.urlCrumbs.push(Crumbs);
 | 
			
		||||
    console.log($rootScope.urlCrumbs);
 | 
			
		||||
 | 
			
		||||
    if (requiresLogin && !Auth.isLoggedIn()) {
 | 
			
		||||
      event.preventDefault();
 | 
			
		||||
      $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 () {
 | 
			
		||||
    console.log('this ran');
 | 
			
		||||
    var subject = vm.currentSubject;
 | 
			
		||||
    var issuer = vm.issuerName;
 | 
			
		||||
    return vm.newOauth3.authenticate({
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user