Scope permissions by SiteId to support entity level authorization as well as improve caching and performance. Optimize GetTenant to use existing cache.

This commit is contained in:
Shaun Walker
2022-11-07 18:16:32 -05:00
parent 2aa6eb90e2
commit 6182b96d16
19 changed files with 103 additions and 115 deletions

View File

@ -72,8 +72,7 @@ namespace Oqtane.Infrastructure
var alias = _siteState?.Alias;
if (alias != null)
{
// return tenant details
return _tenantRepository.GetTenants().ToList().FirstOrDefault(item => item.TenantId == alias.TenantId);
return _tenantRepository.GetTenant(alias.TenantId);
}
return null;
}