Fix route protection that led to infinite redirect

* On login without license data, the user is redirected to the license
page. The license route checked for a condition and returned false.
Explicitly returning false redirects the user -- omitting a return
value lets the user proceed.
This commit is contained in:
gconsidine 2017-08-02 17:21:00 -04:00
parent e1c9388831
commit 0d7fc97259

View File

@ -21,7 +21,9 @@ export default {
onEnter: ['$state', 'ConfigService', (state, configService) => {
return configService.getConfig()
.then(config => {
return _.get(config, 'license_info.license_type') === 'open' && state.go('setup');
if (_.get(config, 'license_info.license_type') === 'open') {
return state.go('setup');
}
});
}],
resolve: {