diff --git a/src/app/components/mnoe-api/current-user.svc.coffee b/src/app/components/mnoe-api/current-user.svc.coffee index bedea32d..4532728b 100644 --- a/src/app/components/mnoe-api/current-user.svc.coffee +++ b/src/app/components/mnoe-api/current-user.svc.coffee @@ -76,15 +76,4 @@ angular.module 'mnoEnterpriseAngular' @updatePassword = (passwordData) -> MnoeApiSvc.all('/current_user').doPUT({user: passwordData}, 'update_password') - # Ensure user is logged in - @loginRequired = -> - _self.get().then( - (response) -> - unless response.logged_in - if MnoeConfig.arePublicApplicationsEnabled() - $state.go('public.landing') - else - $window.location = URI.login - ) - return @ diff --git a/src/app/index.less b/src/app/index.less index 4d6007a9..169db2c4 100644 --- a/src/app/index.less +++ b/src/app/index.less @@ -39,7 +39,7 @@ body { } } -.myspace { +.myspace, .page-wrapper { background-color: @dashboard-bg-color; min-height:100%; } diff --git a/src/app/index.route.coffee b/src/app/index.route.coffee index c61d9b2e..709ea417 100644 --- a/src/app/index.route.coffee +++ b/src/app/index.route.coffee @@ -276,16 +276,16 @@ angular.module 'mnoEnterpriseAngular' MnoeCurrentUser = $injector.get('MnoeCurrentUser') MnoeOrganizations = $injector.get('MnoeOrganizations') MnoeAppInstances = $injector.get('MnoeAppInstances') - $window = $injector.get('$window') MnoeCurrentUser.get().then( (response) -> # Same as MnoeCurrentUser.loginRequired + debugger unless response.logged_in if MnoeConfig.arePublicApplicationsEnabled() $location.url('/landing') else - $window.location = URI.login + $location.url('/login') else if MnoeConfig.isOnboardingWizardEnabled() MnoeOrganizations.getCurrentOrganisation().then( diff --git a/src/app/views/auth/confirmation/confirm.controller.coffee b/src/app/views/auth/confirmation/confirm.controller.coffee new file mode 100644 index 00000000..c5b4ecdf --- /dev/null +++ b/src/app/views/auth/confirmation/confirm.controller.coffee @@ -0,0 +1,17 @@ +angular.module 'mnoEnterpriseAngular' + .controller('AuthConfirmCtrl', + ($state, $stateParams, MnoeAuthSvc, toastr, MnoErrorsHandler) -> + vm = @ + vm.user = {phone_country_code: "US", confirmation_token: $stateParams.confirmation_token} + + MnoeAuthSvc.one("/users/confirmation").get({confirmation_token: vm.user.confirmation_token}).then( + -> + debugger + (error) -> + debugger + ) + + vm.confirmUser = -> + + return + ) diff --git a/src/app/views/auth/confirmation/confirm.html b/src/app/views/auth/confirmation/confirm.html new file mode 100644 index 00000000..71ce1641 --- /dev/null +++ b/src/app/views/auth/confirmation/confirm.html @@ -0,0 +1,306 @@ +