Redirect to the /setup page automatically in the ER when not fully setup

This commit is contained in:
Joseph Schorr 2015-09-02 14:59:54 -04:00
parent b76298121d
commit 0a91a1d9d8
2 changed files with 6 additions and 1 deletions

View file

@ -20,7 +20,7 @@ CLIENT_WHITELIST = ['SERVER_HOSTNAME', 'PREFERRED_URL_SCHEME', 'MIXPANEL_KEY',
'STRIPE_PUBLISHABLE_KEY', 'ENTERPRISE_LOGO_URL', 'SENTRY_PUBLIC_DSN', 'STRIPE_PUBLISHABLE_KEY', 'ENTERPRISE_LOGO_URL', 'SENTRY_PUBLIC_DSN',
'AUTHENTICATION_TYPE', 'REGISTRY_TITLE', 'REGISTRY_TITLE_SHORT', 'AUTHENTICATION_TYPE', 'REGISTRY_TITLE', 'REGISTRY_TITLE_SHORT',
'CONTACT_INFO', 'AVATAR_KIND', 'LOCAL_OAUTH_HANDLER', 'DOCUMENTATION_LOCATION', 'CONTACT_INFO', 'AVATAR_KIND', 'LOCAL_OAUTH_HANDLER', 'DOCUMENTATION_LOCATION',
'DOCUMENTATION_METADATA'] 'DOCUMENTATION_METADATA', 'SETUP_COMPLETE']
def frontend_visible_config(config_dict): def frontend_visible_config(config_dict):

View file

@ -12,6 +12,11 @@
$scope.currentScreenshot = 'repo-view'; $scope.currentScreenshot = 'repo-view';
$scope.userRegistered = false; $scope.userRegistered = false;
if (!Config['SETUP_COMPLETE'] && !Features.BILLING) {
$location.path('/setup');
return;
}
UserService.updateUserIn($scope, function(user) { UserService.updateUserIn($scope, function(user) {
if (!user.anonymous) { if (!user.anonymous) {
$location.path('/repository'); $location.path('/repository');