Browse Source

backend admin host needs permission seed

pull/39/head
cKey 5 years ago
parent
commit
1e9297ba8b
  1. 3
      aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
  2. 2
      aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs
  3. 10
      aspnet-core/services/account/AuthServer.Host/Dockerfile
  4. 15
      aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs

3
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

@ -169,9 +169,6 @@ namespace AuthServer.Host
app.UseIdentityServer(); app.UseIdentityServer();
app.UseAuditing(); app.UseAuditing();
// 处理微信消息
// app.UseWeChatSignature();
SeedData(context); SeedData(context);
} }

2
aspnet-core/services/account/AuthServer.Host/IdentityServer/IdentityServerDataSeedContributor.cs → aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs

@ -16,7 +16,7 @@ using Volo.Abp.IdentityServer.IdentityResources;
using Volo.Abp.PermissionManagement; using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace Multicolin.Aftermarket.IdentityServer namespace AuthServer.DataSeeder
{ {
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
{ {

10
aspnet-core/services/account/AuthServer.Host/Dockerfile

@ -0,0 +1,10 @@
FROM mcr.microsoft.com/dotnet/core/runtime:3.1 AS runtime
LABEL maintainer="colin.in@foxmail.com"
WORKDIR /app
COPY . /app
COPY ../../../configuration/account/AuthServer.Host/appsettings.Development.json /app/appsettings.Development.json
EXPOSE 80/tcp
ENTRYPOINT ["dotnet", "AuthServer.Host.dll"]

15
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs

@ -30,6 +30,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL; using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
@ -47,6 +48,7 @@ using Volo.Abp.Security.Claims;
using Volo.Abp.Security.Encryption; using Volo.Abp.Security.Encryption;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.BackendAdmin namespace LINGYUN.BackendAdmin
@ -250,8 +252,21 @@ namespace LINGYUN.BackendAdmin
}); });
// 审计日志 // 审计日志
app.UseAuditing(); app.UseAuditing();
// 处理微信消息
// app.UseWeChatSignature();
// 路由 // 路由
app.UseConfiguredEndpoints(); app.UseConfiguredEndpoints();
SeedData(context);
}
private void SeedData(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(async () =>
{
using var scope = context.ServiceProvider.CreateScope();
await scope.ServiceProvider.GetRequiredService<IDataSeeder>().SeedAsync();
});
} }
} }
} }

Loading…
Cancel
Save