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
When an OAuth2 user logs in for the first time, their login information is stored in the JHI_USER table, using the syncUserWithIDP method in UserService.
The multitenancy blueprint adds UserService to the Tennant Entity (Company) Aspect class in the beforeExecution method. With this setting, every time the UserService is called it runs userRepository.findOneByLogin, but because sycUserWithIDP hasn't run yet the user is not in the DB throwing a "java.util.NoSuchElementException: No value present" stack trace.
Removing UserService from the pointcut alleviates the issue, but may open a way to see users from other companies
The text was updated successfully, but these errors were encountered:
I have a had a look into this and unfortunately there is no obvious fix. We need to keep this piece ofcode to ensure users with a tenant can't see other tenants. Have you implemented any fix on your project that we could incirporate into the blueprint?
When an OAuth2 user logs in for the first time, their login information is stored in the JHI_USER table, using the syncUserWithIDP method in UserService.
The multitenancy blueprint adds UserService to the Tennant Entity (Company) Aspect class in the beforeExecution method. With this setting, every time the UserService is called it runs userRepository.findOneByLogin, but because sycUserWithIDP hasn't run yet the user is not in the DB throwing a "java.util.NoSuchElementException: No value present" stack trace.
Removing UserService from the pointcut alleviates the issue, but may open a way to see users from other companies
The text was updated successfully, but these errors were encountered: