Better upwell messaging for everyone and show the upsell for organization admins

This commit is contained in:
Joseph Schorr 2014-03-06 18:36:52 -05:00
parent d12a53186a
commit dbb234c76c
5 changed files with 62 additions and 64 deletions

View file

@ -602,10 +602,6 @@ quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'angu
planService.getPlans(function(plans) {
for (var i = 0; i < plans.length; i++) {
var plan = plans[i];
if (isBusiness && !planService.isOrgCompatible(plan)) {
continue;
}
if (plan.privateRepos >= privateCount) {
callback(plan);
return;
@ -613,7 +609,7 @@ quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'angu
}
callback(null);
});
}, /* include personal */!isBusiness);
};
planService.getSubscription = function(orgname, success, failure) {
@ -2077,8 +2073,8 @@ quayApp.directive('headerBar', function () {
return;
}
ApiService.getUserPrivateCount().then(function(resp) {
$scope.overPlan = resp.privateCount > resp.reposAllowed;
ApiService.getUserPrivateAllowed().then(function(resp) {
$scope.overPlan = !resp['privateAllowed'];
});
};