From 1f90aa5b59f51d9e0416440b0e4501a13f254577 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 21 Sep 2015 16:42:16 -0400 Subject: [PATCH] Fix repo count checker when the user service has not yet loaded Fixes #521 --- static/js/directives/ui/repo-count-checker.js | 2 +- static/js/services/user-service.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/static/js/directives/ui/repo-count-checker.js b/static/js/directives/ui/repo-count-checker.js index 9cec0f1c4..63b9be492 100644 --- a/static/js/directives/ui/repo-count-checker.js +++ b/static/js/directives/ui/repo-count-checker.js @@ -23,7 +23,7 @@ angular.module('quay').directive('repoCountChecker', function () { } $scope.checkingPlan = true; - $scope.isUserNamespace = UserService.isUserNamespace($scope.namespace); + $scope.isUserNamespace = !UserService.isOrganization($scope.namespace); ApiService.getPrivateAllowed($scope.isUserNamespace ? null : $scope.namespace).then(function(resp) { $scope.checkingPlan = false; diff --git a/static/js/services/user-service.js b/static/js/services/user-service.js index 10e5460f2..d6bce37cc 100644 --- a/static/js/services/user-service.js +++ b/static/js/services/user-service.js @@ -126,10 +126,6 @@ function(ApiService, CookieService, $rootScope, Config) { return userResponse; }; - userService.isUserNamespace = function(namespace) { - return namespace == userResponse.username; - }; - // Update the user in the root scope. userService.updateUserIn($rootScope);