fix issue #170 which is related to the host user not being part of the Registered Users role

This commit is contained in:
Shaun Walker
2019-11-13 18:39:04 -05:00
parent ffba735aac
commit b4cd038e17
12 changed files with 177 additions and 19 deletions

View File

@ -0,0 +1,21 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using Oqtane.Models;
using Oqtane.Repository;
namespace Oqtane.Infrastructure
{
public class TestJob : HostedServiceBase
{
public TestJob(IServiceScopeFactory ServiceScopeFactory) : base(ServiceScopeFactory) {}
public override void ExecuteJob(IServiceProvider provider)
{
var Tenants = provider.GetRequiredService<ITenantRepository>();
foreach(Tenant tenant in Tenants.GetTenants())
{
// is it possible to set the HttpContext so that DbContextBase will resolve properly for tenants?
}
}
}
}