From 2b05c2e8e9c899bbb0db3cd9084e82c15122acf5 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:38:25 +0800 Subject: [PATCH 1/3] fix client icon and Platform Permission name --- .../Platform/Localization/ApplicationContracts/zh-Hans.json | 4 ++-- .../LINGYUN/Platform/PlatformDataSeedContributor.cs | 2 +- vueJs/debug.log | 1 + vueJs/src/api/api-resources.ts | 2 +- vueJs/src/api/clients.ts | 2 +- vueJs/src/api/identity-server4.ts | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json index 3df58b42c..a7f03d54a 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Localization/ApplicationContracts/zh-Hans.json @@ -22,8 +22,8 @@ "Permission:Layout": "布局管理", "Permission:Menu": "菜单管理", "Permission:Create": "新增", - "Permission:Update": "新增", - "Permission:Delete": "新增", + "Permission:Update": "编辑", + "Permission:Delete": "删除", "Permission:ManageItems": "管理项目", "Permission:ManageRoleMenus": "管理角色菜单", "Permission:ManageUserMenus": "管理用户菜单" diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs index a8025340b..63945d0f9 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs @@ -434,7 +434,7 @@ namespace LINGYUN.Platform new Dictionary() { { "title", "clients" }, - { "icon", "clients" }, + { "icon", "client" }, { "roles", new string[]{ "AbpIdentityServer.Clients" } } }, new string[] { "admin" }); diff --git a/vueJs/debug.log b/vueJs/debug.log index b2f7937ce..b0c773f37 100644 --- a/vueJs/debug.log +++ b/vueJs/debug.log @@ -6,3 +6,4 @@ [1221/155401.113:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) [1222/155401.133:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) [1223/145638.708:ERROR:filesystem_win.cc(148)] DeleteFile C:\Users\iVarKey\AppData\Local\Google\Chrome\User Data\Crashpad\reports\0106539b-a680-4c00-8e38-5a7a621345b9.dmp: һʹôļ޷ʡ (0x20) +[1225/102752.308:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) diff --git a/vueJs/src/api/api-resources.ts b/vueJs/src/api/api-resources.ts index 9556b86f8..340565232 100644 --- a/vueJs/src/api/api-resources.ts +++ b/vueJs/src/api/api-resources.ts @@ -95,7 +95,7 @@ export class ApiResourceCreateOrUpdate { allowedAccessTokenSigningAlgorithms?: string = '' userClaims = new Array() scopes = new Array() - secrets = new Array() + secrets = new Array() properties = new Array() } diff --git a/vueJs/src/api/clients.ts b/vueJs/src/api/clients.ts index 984a088dd..1d2c1c2ab 100644 --- a/vueJs/src/api/clients.ts +++ b/vueJs/src/api/clients.ts @@ -258,7 +258,7 @@ export class ClientUpdate extends ClientCreateOrUpdate { this.postLogoutRedirectUris = client.postLogoutRedirectUris this.identityProviderRestrictions = client.identityProviderRestrictions this.allowedScopes = client.allowedScopes - this.secrets = client.clientSecrets + this.clientSecrets = client.clientSecrets this.claims = client.claims this.properties = client.properties } diff --git a/vueJs/src/api/identity-server4.ts b/vueJs/src/api/identity-server4.ts index 023ef5625..a6fc9deb2 100644 --- a/vueJs/src/api/identity-server4.ts +++ b/vueJs/src/api/identity-server4.ts @@ -1,4 +1,5 @@ import ApiService from './serviceBase' +import { getOrDefault } from '@/utils/localStorage' const openIdConfigurationUrl = '/.well-known/openid-configuration' From b07ed843fc971ae3c8316a780a3acc185f2d65d2 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:42:10 +0800 Subject: [PATCH 2/3] The component of the menu only needs to set the default value in the non-edit state --- .../menus/components/CreateOrUpdateMenuDialog.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue b/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue index d9883f0ec..fea5c5eed 100644 --- a/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue +++ b/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue @@ -278,10 +278,10 @@ export default class CreateOrUpdateMenuDialog extends Vue { if (layout) { if (!this.isEdit) { this.menu.meta = {} - } - if (!this.parentId) { - // 对于根菜单,自动设置组件路径为布局路径 - this.menu.component = layout.path + if (!this.parentId) { + // 对于根菜单,自动设置组件路径为布局路径 + this.menu.component = layout.path + } } DataService .get(layout.dataId) From 582b04e1493ed06ef10c2d236da191fcf5026c5d Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:45:05 +0800 Subject: [PATCH 3/3] Platform menu seed added API Scope management page --- .../Platform/PlatformDataSeedContributor.cs | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs index 63945d0f9..491925525 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDataSeedContributor.cs @@ -415,7 +415,7 @@ namespace LINGYUN.Platform { "title", "identity-server" }, { "icon", "identity-server" }, { "alwaysShow", true }, - { "roles", new string[]{ "AbpIdentityServer.Clients", "AbpIdentityServer.ApiResources", "AbpIdentityServer.IdentityResources" } } + { "roles", new string[]{ "AbpIdentityServer.Clients", "AbpIdentityServer.ApiResources", "AbpIdentityServer.IdentityResources", "AbpIdentityServer.ApiScopes" } } }, new string[] { "admin" }); @@ -462,7 +462,7 @@ namespace LINGYUN.Platform data, "identity-resources", "identity-resources", - CodeNumberGenerator.AppendCode(identityServerMenu.Code, CodeNumberGenerator.CreateCode(2)), + CodeNumberGenerator.AppendCode(identityServerMenu.Code, CodeNumberGenerator.CreateCode(3)), "views/admin/identityServer/identity-resources/index.vue", "Manage Identity Resources", "", @@ -476,6 +476,25 @@ namespace LINGYUN.Platform { "roles", new string[]{ "AbpIdentityServer.IdentityResources" } } }, new string[] { "admin" }); + await SeedMenuAsync( + layout, + data, + "api-scopes", + "api-scopes", + CodeNumberGenerator.AppendCode(identityServerMenu.Code, CodeNumberGenerator.CreateCode(4)), + "views/admin/identityServer/api-scopes/index.vue", + "Manage Api Scopes", + "", + "Manage Api Scopes", + identityServerMenu.Id, + layout.TenantId, + new Dictionary() + { + { "title", "api-scopes" }, + { "icon", "api-scopes" }, + { "roles", new string[]{ "AbpIdentityServer.ApiScopes" } } + }, + new string[] { "admin" }); } private async Task SeedAuditingMenuAsync(Layout layout, Data data)