diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index 99528c7d2d..3413afac9c 100644 --- a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AutoMapper; using Volo.Abp.Identity; +using Volo.Abp.IdentityServer.AspNetIdentity; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.Modularity; using Volo.Abp.Security; @@ -38,6 +39,8 @@ namespace Volo.Abp.IdentityServer identityServerBuilder .AddDeveloperSigningCredential() //TODO: Should be able to change this! + .AddClientStore() + .AddResourceStore() .AddAbpIdentityServer(); services.ExecutePreConfiguredActions(identityServerBuilder); diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs index 28583b78ee..467967b26e 100644 --- a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs +++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs @@ -1,11 +1,10 @@ using System.Threading.Tasks; using IdentityServer4.Stores; -using Volo.Abp.DependencyInjection; using Volo.Abp.ObjectMapping; namespace Volo.Abp.IdentityServer.Clients { - public class ClientStore : IClientStore, ITransientDependency + public class ClientStore : IClientStore { private readonly IClientRepository _clientRepository; private readonly IObjectMapper _objectMapper; diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 37546e9934..f7025abd95 100644 --- a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -3,14 +3,13 @@ using System.Linq; using System.Threading.Tasks; using IdentityServer4.Models; using IdentityServer4.Stores; -using Volo.Abp.DependencyInjection; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; namespace Volo.Abp.IdentityServer { - public class ResourceStore : IResourceStore, ITransientDependency + public class ResourceStore : IResourceStore { private readonly IIdentityResourceRepository _identityResourceRepository; private readonly IObjectMapper _objectMapper; diff --git a/src/Volo.Abp.MultiTenancy.Web/AbpMultiTenancyWebModule.cs b/src/Volo.Abp.MultiTenancy.Web/AbpMultiTenancyWebModule.cs index 21c2373d80..ded1b2f2c3 100644 --- a/src/Volo.Abp.MultiTenancy.Web/AbpMultiTenancyWebModule.cs +++ b/src/Volo.Abp.MultiTenancy.Web/AbpMultiTenancyWebModule.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AutoMapper; @@ -26,8 +27,6 @@ namespace Volo.Abp.MultiTenancy.Web public override void ConfigureServices(IServiceCollection services) { - services.AddAssemblyOf(); - services.Configure(options => { options.MenuContributors.Add(new AbpMultiTenancyWebMainMenuContributor()); @@ -47,6 +46,15 @@ namespace Volo.Abp.MultiTenancy.Web { options.AddProfile(validate: true); }); + + services.Configure(options => + { + options.Conventions.AuthorizePage("/MultiTenancy/Tenants/Index", TenantManagementPermissions.Tenants.Default); + options.Conventions.AuthorizePage("/MultiTenancy/Tenants/CreateModal", TenantManagementPermissions.Tenants.Create); + options.Conventions.AuthorizePage("/MultiTenancy/Tenants/EditModal", TenantManagementPermissions.Tenants.Update); + }); + + services.AddAssemblyOf(); } } } \ No newline at end of file