From 3ff450d9b07ededb601a505683af7ee121a26bb2 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Thu, 2 Jul 2020 21:13:25 +0800 Subject: [PATCH] Fixed identity server client permission bugs in the framework --- .../PlatformHttpApiHostModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs index 550e53015..4e2b1e02e 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs @@ -27,6 +27,7 @@ using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.AspNetCore.Authentication.JwtBearer; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using Volo.Abp.Authorization.Permissions; using Volo.Abp.Autofac; using Volo.Abp.Caching; using Volo.Abp.EntityFrameworkCore; @@ -126,6 +127,13 @@ namespace LINGYUN.Platform options.DefaultSalt = Encoding.ASCII.GetBytes("sf&5)s3#"); }); + Configure(options => + { + // Rename IdentityServer.Client.ManagePermissions + // See https://github.com/abpframework/abp/blob/dev/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo/Abp/PermissionManagement/IdentityServer/AbpPermissionManagementDomainIdentityServerModule.cs + options.ProviderPolicies[ClientPermissionValueProvider.ProviderName] = AbpIdentityServerPermissions.Clients.ManagePermissions; + }); + // 自定义需要处理的异常 Configure(options => {