Browse Source
Merge pull request #39 from colinin/3.0
backend admin host needs permission seed
pull/81/head
cKey
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
26 additions and
4 deletions
-
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
-
aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs
-
aspnet-core/services/account/AuthServer.Host/Dockerfile
-
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs
|
|
|
@ -169,9 +169,6 @@ namespace AuthServer.Host |
|
|
|
app.UseIdentityServer(); |
|
|
|
app.UseAuditing(); |
|
|
|
|
|
|
|
// 处理微信消息
|
|
|
|
// app.UseWeChatSignature();
|
|
|
|
|
|
|
|
SeedData(context); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ using Volo.Abp.IdentityServer.IdentityResources; |
|
|
|
using Volo.Abp.PermissionManagement; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
|
|
namespace Multicolin.Aftermarket.IdentityServer |
|
|
|
namespace AuthServer.DataSeeder |
|
|
|
{ |
|
|
|
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency |
|
|
|
{ |
|
|
|
@ -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"] |
|
|
|
@ -30,6 +30,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; |
|
|
|
using Volo.Abp.Authorization.Permissions; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
|
using Volo.Abp.EntityFrameworkCore.MySQL; |
|
|
|
using Volo.Abp.Identity.EntityFrameworkCore; |
|
|
|
@ -47,6 +48,7 @@ using Volo.Abp.Security.Claims; |
|
|
|
using Volo.Abp.Security.Encryption; |
|
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
|
|
|
|
namespace LINGYUN.BackendAdmin |
|
|
|
@ -250,8 +252,21 @@ namespace LINGYUN.BackendAdmin |
|
|
|
}); |
|
|
|
// 审计日志
|
|
|
|
app.UseAuditing(); |
|
|
|
// 处理微信消息
|
|
|
|
// app.UseWeChatSignature();
|
|
|
|
// 路由
|
|
|
|
app.UseConfiguredEndpoints(); |
|
|
|
|
|
|
|
SeedData(context); |
|
|
|
} |
|
|
|
|
|
|
|
private void SeedData(ApplicationInitializationContext context) |
|
|
|
{ |
|
|
|
AsyncHelper.RunSync(async () => |
|
|
|
{ |
|
|
|
using var scope = context.ServiceProvider.CreateScope(); |
|
|
|
await scope.ServiceProvider.GetRequiredService<IDataSeeder>().SeedAsync(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|