Skip to content

Non Tenant discriminated Entities joining tenant discriminated Entities outside their Tenant context. #45596

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

Closed
White-waluigi opened this issue May 18, 2025 · 1 comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com

Comments

@White-waluigi
Copy link

Basically, imagine we have 2 Entities:

User and UserTenantLink. UserTenantLink has a OneToOne connection to User. User has a tenant field, UserTenantLink does not. As soon as a User attempts a Login, A UserTenantLink with the correct user Id is search and if it is found, the corresponding tenanant Context is opened for that request (which happens for almost every request).

But I have found that UserTenantLink will fetch User even outside the tenant context. I don't know if that is intended behavior since the whole point of a tenant context is to cleanly separate certain entites from each other so they can never be loaded together (which is now technically possible by joining them to a non tenant discriminated entitiy)

I feel like you should never be able to access tenant discriminated data outside of its own tenant context.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 18, 2025
@snicoll
Copy link
Member

snicoll commented May 18, 2025

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2025
@snicoll snicoll added for: stackoverflow A question that's better suited to stackoverflow.com and removed status: waiting-for-triage An issue we've not yet triaged labels May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com
Projects
None yet
Development

No branches or pull requests

3 participants