|
|
|
@ -16,12 +16,15 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theming; |
|
|
|
using Volo.Abp.Authorization.Permissions; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Volo.Abp.Identity.Web; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.PermissionManagement; |
|
|
|
using Volo.Abp.PermissionManagement.Identity; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
using Volo.Abp.UI; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
@ -41,6 +44,8 @@ namespace Volo.DocsTestApp |
|
|
|
typeof(AbpAccountWebModule), |
|
|
|
typeof(AbpIdentityWebModule), |
|
|
|
typeof(AbpIdentityApplicationModule), |
|
|
|
typeof(AbpPermissionManagementDomainIdentityModule), |
|
|
|
typeof(AbpPermissionManagementApplicationModule), |
|
|
|
typeof(AbpAspNetCoreMvcUiBasicThemeModule) |
|
|
|
)] |
|
|
|
public class DocsTestAppModule : AbpModule |
|
|
|
@ -127,15 +132,25 @@ namespace Volo.DocsTestApp |
|
|
|
template: "{controller=Home}/{action=Index}/{id?}"); |
|
|
|
}); |
|
|
|
|
|
|
|
AsyncHelper.RunSync(async () => |
|
|
|
using (var scope = context.ServiceProvider.CreateScope()) |
|
|
|
{ |
|
|
|
await context.ServiceProvider |
|
|
|
.GetRequiredService<IIdentityDataSeeder>() |
|
|
|
.SeedAsync( |
|
|
|
"1q2w3E*", |
|
|
|
IdentityPermissions.GetAll().Union(DocsAdminPermissions.GetAll()) |
|
|
|
); |
|
|
|
}); |
|
|
|
AsyncHelper.RunSync(async () => |
|
|
|
{ |
|
|
|
await context.ServiceProvider |
|
|
|
.GetRequiredService<IIdentityDataSeeder>() |
|
|
|
.SeedAsync( |
|
|
|
"1q2w3E*" |
|
|
|
); |
|
|
|
|
|
|
|
await scope.ServiceProvider |
|
|
|
.GetRequiredService<IPermissionDataSeeder>() |
|
|
|
.SeedAsync( |
|
|
|
RolePermissionValueProvider.ProviderName, |
|
|
|
"admin", |
|
|
|
IdentityPermissions.GetAll().Union(DocsAdminPermissions.GetAll()) |
|
|
|
); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|