EquinoxProject
EquinoxProject copied to clipboard
Support for Multi Tenancy
I would like to know if you have plans to add support for multi tenancy.
It's a good idea, I'll think about.
When V3 will be visible ? IdentityServer and MultiTenancy needed :)
regards
In the meantime: Where should multitenancy authorization sit? As it has to access the resource, it looks like it should call AuthService inside the Repository but is it in line with the patterns ? Auth has to check the tenantId of the resource and compare it with user tenantId... Can anyone help?
I solved with this. but needs caching,Injectable to views/layouts ext. by the way saves the day 👍 Contributers of this project will do better , i am sure on that.
Startup ;
services.AddScoped(typeof(TenantAttribute));
Controller [ServiceFilter(typeof(TenantAttribute))] [Area("Management")] public class UserController : BaseController { .... } Attribute public class TenantAttribute : ActionFilterAttribute { private readonly EquinoxContext _dbContext; public TenantAttribute(EquinoxContext dbContext) { _dbContext = dbContext; }
public override void OnActionExecuting(ActionExecutingContext actionExecutingContext)
{
var fullAddress = actionExecutingContext.HttpContext?.Request?.Headers?["Host"].ToString();
var tenant = _dbContext.Tenants.Where(t => t.url == fullAddress);
actionExecutingContext.RouteData.Values.Add("tenant", tenant);
}
}
Take a look at the SaasKit project: https://github.com/saaskit/saaskit I've used it and it met my needs well.
Hi Tiago. Have you a online sample (Blog, GitHub, or You Tube) or detailed documentation of SaasKit?
Saaskit looks abandoned
On Mon, 5 Feb 2018, 13:32 Leonardo Ribeiro de Aguiar, < [email protected]> wrote:
Hi Tiago. Have you a online sample (Blog, GitHub, or You Tube) or detailed documentation of SaasKit?
On Mon, Feb 5, 2018, 11:24 Tiago Azevedo Borges [email protected] wrote:
Take a look at the SaasKit project: https://github.com/saaskit/saaskit I've used it and it met my needs well.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/EduardoPires/EquinoxProject/issues/27#issuecomment-363083395 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAZCIDEvB2di2cOoU75tkcS-10nroUhKks5tRwEegaJpZM4O03Ii
.
-- Leonardo Ribeiro de Aguiar (11) 9.9680-0260 https://br.linkedin.com/in/leonardoraguiar
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EduardoPires/EquinoxProject/issues/27#issuecomment-363085414, or mute the thread https://github.com/notifications/unsubscribe-auth/AI80kjI767w_JcRUyZurVP994Zo5l5akks5tRwL5gaJpZM4O03Ii .
Even though it seems abandoned, the source code is still there.
This other project uses SaasKit with Asp.net Core and was my starting point: https://github.com/janaks09/NetCoreSaaS
In my account also have a project made from SaaSKit, although incomplete.
Thank you
@leonardoaguiar
Edit your comment and remove your cellphone :)
@leonardoaguiar
Edit your comment and remove your cellphone :)
Done. Thank you.