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

Optional auto scoping by tenant .. #2

Open
sjmcdowall opened this issue Aug 7, 2018 · 0 comments
Open

Optional auto scoping by tenant .. #2

sjmcdowall opened this issue Aug 7, 2018 · 0 comments

Comments

@sjmcdowall
Copy link

sjmcdowall commented Aug 7, 2018

Our use case I think is pretty standard ... we have both users and organizations. There is not a one to one mapping between the two. I.e. a user can belong to multiple organizations. The vast majority of queries will use the organization as the tenantId .. however, there will be certainly queries against some tables where there is both the userId AND the tenantId .. where we want to query only against the userId.

For example, to get the list of organizations a user belongs to -- there is a user_organization table .. when we query against that table we do not want to auto inject the tenantId to restrict it ..

So how can we "fine" tune the auto injection!?

BTW -- these tables have been around for 15 years with a LOT of supporting code behind it, so it's not as simple as just renaming the column in the tables we don't want to autoinject.. :)

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant