In our system a user can access data of one or multiple clients (tenant). The IDs of all tenants, he is allowed to work with, are fetched while loggin in.
(A) Now, where would you store this information for a user, the IDs of which tenants he is allowed to fetch?
(B) And what is the state of an answer to the post back in 2009? (http://forums.lhotka.net/forums/t/8011.aspx)
Is this the RoleSet?
That's a long thread, I don't have time to decipher what was "issue 13". If that was to support multi-tenant business and authz rules, then yes, that is a feature of CSLA 4. The feature is implemented through the concept of rule sets.
Thanks, this answers part (B).
I suspected that this wouldn't solve my modality of multi-tenant.
My solution is to restrict right down in SQL, something like SELECT ... WHERE tenantid in (1,2,5,7).
All I have to do is send the "(1,2,5,7)" from client to the sever.
Remmains question (A), where should I store the IDs?
I think those are your two primary options, yes.
If the TenantId concept is a per-user thing I'd probably put the values in the custom identity object.
If the concept isn't directly tied to the user I'd tend to use ClientContext.
Copyright (c) Marimer LLC