Skip to content

Commit

Permalink
Gets new user authorizations rather than loads user on group change
Browse files Browse the repository at this point in the history
Also sends user to dashboard, else they get stuck on a page they shouldn't be on and get pummled with errors
  • Loading branch information
AllenBW committed Jan 18, 2018
1 parent 9c9a5d8 commit 4053183
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/app/core/navigation/navigation-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ export function NavigationController (Text, Navigation, Session, API_BASE, Shopp

function success () {
Session.setGroup(group)
Session.loadUser()
Session.getUserAuthorizations()
vm.user = Session.currentUser
$state.go($state.current, {}, {reload: true})
$state.go('dashboard', {}, {reload: true})
}

function failure (response) {
Expand Down
3 changes: 2 additions & 1 deletion client/app/core/session.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export function SessionFactory ($http, $sessionStorage, $cookies, RBAC, Polling)
requestWsToken: requestWsToken,
destroyWsToken: destroyWsToken,
setPause: setPause,
updateUserSession: updateUserSession
updateUserSession: updateUserSession,
getUserAuthorizations: getUserAuthorizations
}

destroy()
Expand Down

0 comments on commit 4053183

Please sign in to comment.