sentry
sentry copied to clipboard
fix(config): Ensure user is member of lastOrganization
In addition to checking for the existence of lastOrganization (https://github.com/getsentry/sentry/pull/37032), we would also need to check if the user is a member of the lastOrganization.
I've also included a test case to check that usage of API tokens does not induce setting the activeorg key in the user's session.
This is due diligence as part of the customer domain work for hybrid cloud.