diff --git a/static/js/pages/billing.js b/static/js/pages/billing.js index 6fa2168cd..1b39a509f 100644 --- a/static/js/pages/billing.js +++ b/static/js/pages/billing.js @@ -22,7 +22,7 @@ }]); - function BillingCtrl($scope, ApiService, $routeParams) { + function BillingCtrl($scope, ApiService, $routeParams, UserService) { $scope.orgname = $routeParams['orgname']; $scope.username = $routeParams['username']; @@ -32,8 +32,11 @@ $scope.organization = org; }); } else { - $scope.entityResource = ApiService.getUserInformationAsResource({'username': $scope.username}).get(function(user) { - $scope.viewuser = user; + UserService.updateUserIn($scope, function(currentUser) { + $scope.entityResource = ApiService.getUserInformationAsResource({'username': $scope.username}).get(function(user) { + $scope.invaliduser = !currentUser || currentUser.username != $scope.username; + $scope.viewuser = user; + }); }); } }; diff --git a/static/partials/billing.html b/static/partials/billing.html index 00d7a9d25..8cb5c5afb 100644 --- a/static/partials/billing.html +++ b/static/partials/billing.html @@ -25,8 +25,13 @@