You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2019. It is now read-only.
There are a few places in web-gateway that look up a user by looping through nav.getUsers() and checking for a matching user ID. The current user is also looked up from the same list, and passed when creating a new Nav
With the changes in #131, this list of users is incomplete and eventually consistent, so this won't always work.
The following places in the code should be changed to stop using nav.getUsers(), and instead use userService.getUser(userId) to look up the user instead:
AbstractController.loadNav (here, it isn't calling nav.getUsers(), because it hasn't created nav yet, but it is doing something similar: looping through the list of users returned from userService.getUsers to look for the current user ID, which may not be in that list)
Note that, because service calls are asynchronous, you'll now need to use the CompletionStage API. You might find it helpful to refactor the existing controller methods to extract small parts into helper methods.
At the end of this change, the only thing left using nav.getUsers() should be the list of users that displays in the navigation menu.
This should also fix #144. Please be sure to test manually to verify this.
The text was updated successfully, but these errors were encountered:
There are a few places in
web-gateway
that look up a user by looping throughnav.getUsers()
and checking for a matching user ID. The current user is also looked up from the same list, and passed when creating a newNav
With the changes in #131, this list of users is incomplete and eventually consistent, so this won't always work.
The following places in the code should be changed to stop using
nav.getUsers()
, and instead useuserService.getUser(userId)
to look up the user instead:ItemController.doGetItem
TransactionController.getTransaction
AbstractController.loadNav
(here, it isn't callingnav.getUsers()
, because it hasn't creatednav
yet, but it is doing something similar: looping through the list of users returned fromuserService.getUsers
to look for the current user ID, which may not be in that list)Note that, because service calls are asynchronous, you'll now need to use the
CompletionStage
API. You might find it helpful to refactor the existing controller methods to extract small parts into helper methods.At the end of this change, the only thing left using
nav.getUsers()
should be the list of users that displays in the navigation menu.This should also fix #144. Please be sure to test manually to verify this.
The text was updated successfully, but these errors were encountered: