Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Current Tenant from UserInfo #1873

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Conversation

jakobvogel
Copy link
Member

Description

The previous implementation used tenants.getCurrentUser() which resolves a database object. However, if we use synthetic users (as we do, for instance, in tenants.runAsAdminOfTenant(…)), there is no database entry, and this method always returned null. A UserInfo object on the other hand can always be resolved, and along with it a tenant object.

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices

The previous implementation used `getCurrentUser()` which resolves a database object. However, if we use synthetic users (as we do, for instance, in `runAsAdminOfTenant(…)`), there is no database entry, and this method always returned **null**. A `UserInfo` object on the other hand can always be resolved, and along with it a tenant object.
@jakobvogel jakobvogel added the 🐛 Bugfix Contains only a small fix for an existing bug label Nov 14, 2023
@jakobvogel jakobvogel merged commit 3468fb8 into develop Nov 15, 2023
2 checks passed
@jakobvogel jakobvogel deleted the feature/jvo/Fix-Current-Tenant branch November 15, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bugfix Contains only a small fix for an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants