From 0a91a1d9d89dfe53c3162b3f0e5773c52887a920 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 2 Sep 2015 14:59:54 -0400 Subject: [PATCH] Redirect to the /setup page automatically in the ER when not fully setup --- config.py | 2 +- static/js/pages/landing.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index a1ecb2d52..ea65ad54e 100644 --- a/config.py +++ b/config.py @@ -20,7 +20,7 @@ CLIENT_WHITELIST = ['SERVER_HOSTNAME', 'PREFERRED_URL_SCHEME', 'MIXPANEL_KEY', 'STRIPE_PUBLISHABLE_KEY', 'ENTERPRISE_LOGO_URL', 'SENTRY_PUBLIC_DSN', 'AUTHENTICATION_TYPE', 'REGISTRY_TITLE', 'REGISTRY_TITLE_SHORT', 'CONTACT_INFO', 'AVATAR_KIND', 'LOCAL_OAUTH_HANDLER', 'DOCUMENTATION_LOCATION', - 'DOCUMENTATION_METADATA'] + 'DOCUMENTATION_METADATA', 'SETUP_COMPLETE'] def frontend_visible_config(config_dict): diff --git a/static/js/pages/landing.js b/static/js/pages/landing.js index 53c0e733e..e0f2c4d45 100644 --- a/static/js/pages/landing.js +++ b/static/js/pages/landing.js @@ -12,6 +12,11 @@ $scope.currentScreenshot = 'repo-view'; $scope.userRegistered = false; + if (!Config['SETUP_COMPLETE'] && !Features.BILLING) { + $location.path('/setup'); + return; + } + UserService.updateUserIn($scope, function(user) { if (!user.anonymous) { $location.path('/repository');