Browse Source

docs module fixed for permission changes

pull/765/head
Halil ibrahim Kalkan 8 years ago
parent
commit
3ffe3cf9b7
  1. 31
      modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs
  2. 2
      modules/docs/app/Volo.DocsTestApp/Volo.DocsTestApp.csproj

31
modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs

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

2
modules/docs/app/Volo.DocsTestApp/Volo.DocsTestApp.csproj

@ -26,6 +26,8 @@
<ProjectReference Include="..\Volo.DocsTestApp.EntityFrameworkCore\Volo.DocsTestApp.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\Volo.DocsTestApp.EntityFrameworkCore\Volo.DocsTestApp.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> <ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" /> <ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" /> <ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save