From 00febf39e1112ed9c31c4cf838a28afefebd2eaa Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:10:16 +0800 Subject: [PATCH 01/23] =?UTF-8?q?feat(openiddict):=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96openiddict=E5=8C=85.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/@abp/openiddict/package.json | 37 +++++++++++++++++++ .../packages/@abp/openiddict/tsconfig.json | 6 +++ 2 files changed, 43 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/package.json create mode 100644 apps/vben5/packages/@abp/openiddict/tsconfig.json diff --git a/apps/vben5/packages/@abp/openiddict/package.json b/apps/vben5/packages/@abp/openiddict/package.json new file mode 100644 index 000000000..2824afaf8 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/package.json @@ -0,0 +1,37 @@ +{ + "name": "@abp/openiddict", + "version": "8.3.2", + "homepage": "https://github.com/colinin/abp-next-admin", + "bugs": "https://github.com/colinin/abp-next-admin/issues", + "repository": { + "type": "git", + "url": "git+https://github.com/colinin/abp-next-admin.git", + "directory": "packages/@abp/openiddict" + }, + "license": "MIT", + "type": "module", + "sideEffects": [ + "**/*.css" + ], + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./src/index.ts" + } + }, + "dependencies": { + "@abp/core": "workspace:*", + "@abp/permission": "workspace:*", + "@abp/request": "workspace:*", + "@abp/ui": "workspace:*", + "@ant-design/icons-vue": "catalog:", + "@vben/access": "workspace:*", + "@vben/common-ui": "workspace:*", + "@vben/hooks": "workspace:*", + "@vben/icons": "workspace:*", + "@vben/layouts": "workspace:*", + "@vben/locales": "workspace:*", + "ant-design-vue": "catalog:", + "vue": "catalog:*" + } +} diff --git a/apps/vben5/packages/@abp/openiddict/tsconfig.json b/apps/vben5/packages/@abp/openiddict/tsconfig.json new file mode 100644 index 000000000..ce1a891fb --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@vben/tsconfig/web.json", + "include": ["src"], + "exclude": ["node_modules"] +} From c8a1d188e4d111fd41f5fd746b5bd09671d968f0 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:10:49 +0800 Subject: [PATCH 02/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E7=B1=BB=E5=9E=8B=E5=AF=BC=E5=87=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/@abp/openiddict/src/index.ts | 1 + .../@abp/openiddict/src/types/applications.ts | 62 +++++++++++++++++++ .../@abp/openiddict/src/types/index.ts | 1 + 3 files changed, 64 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/index.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/types/applications.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/types/index.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/index.ts b/apps/vben5/packages/@abp/openiddict/src/index.ts new file mode 100644 index 000000000..fcb073fef --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/apps/vben5/packages/@abp/openiddict/src/types/applications.ts b/apps/vben5/packages/@abp/openiddict/src/types/applications.ts new file mode 100644 index 000000000..d964debc5 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/types/applications.ts @@ -0,0 +1,62 @@ +import type { + Dictionary, + ExtensibleAuditedEntityDto, + ExtensibleObject, + PagedAndSortedResultRequestDto, +} from '@abp/core'; + +interface OpenIddictApplicationGetListInput + extends PagedAndSortedResultRequestDto { + filter?: string; +} + +interface OpenIddictApplicationCreateOrUpdateDto extends ExtensibleObject { + applicationType?: string; + clientId: string; + clientSecret?: string; + clientType?: string; + clientUri?: string; + consentType?: string; + displayName?: string; + displayNames?: Dictionary; + endpoints?: string[]; + grantTypes?: string[]; + logoUri?: string; + postLogoutRedirectUris?: string[]; + properties?: Dictionary; + redirectUris?: string[]; + requirements?: string[]; + responseTypes?: string[]; + scopes?: string[]; +} + +type OpenIddictApplicationCreateDto = OpenIddictApplicationCreateOrUpdateDto; + +type OpenIddictApplicationUpdateDto = OpenIddictApplicationCreateOrUpdateDto; + +interface OpenIddictApplicationDto extends ExtensibleAuditedEntityDto { + applicationType?: string; + clientId: string; + clientSecret?: string; + clientType?: string; + clientUri?: string; + consentType?: string; + displayName?: string; + displayNames?: Dictionary; + endpoints?: string[]; + grantTypes?: string[]; + logoUri?: string; + postLogoutRedirectUris?: string[]; + properties?: Dictionary; + redirectUris?: string[]; + requirements?: string[]; + responseTypes?: string[]; + scopes?: string[]; +} + +export type { + OpenIddictApplicationCreateDto, + OpenIddictApplicationDto, + OpenIddictApplicationGetListInput, + OpenIddictApplicationUpdateDto, +}; diff --git a/apps/vben5/packages/@abp/openiddict/src/types/index.ts b/apps/vben5/packages/@abp/openiddict/src/types/index.ts new file mode 100644 index 000000000..ad838b1d0 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/types/index.ts @@ -0,0 +1 @@ +export * from './applications'; From 7bb34a14084417e0d4bc573fd62fcd6395e0884e Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:13:20 +0800 Subject: [PATCH 03/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=87=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@abp/openiddict/src/api/applications.ts | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/api/applications.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/api/applications.ts b/apps/vben5/packages/@abp/openiddict/src/api/applications.ts new file mode 100644 index 000000000..43aff5d92 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/api/applications.ts @@ -0,0 +1,74 @@ +import type { PagedResultDto } from '@abp/core'; + +import type { + OpenIddictApplicationCreateDto, + OpenIddictApplicationDto, + OpenIddictApplicationGetListInput, + OpenIddictApplicationUpdateDto, +} from '../types/applications'; + +import { requestClient } from '@abp/request'; + +/** + * 新增应用 + * @param input 参数 + * @returns 应用实体数据传输对象 + */ +export function createApi( + input: OpenIddictApplicationCreateDto, +): Promise { + return requestClient.post( + '/api/openiddict/applications', + input, + ); +} + +/** + * 删除应用 + * @param id 应用id + */ +export function deleteApi(id: string): Promise { + return requestClient.delete(`/api/openiddict/applications/${id}`); +} + +/** + * 查询应用 + * @param id 应用id + * @returns 应用实体数据传输对象 + */ +export function getApi(id: string): Promise { + return requestClient.get( + `/api/openiddict/applications/${id}`, + ); +} + +/** + * 更新应用 + * @param id 应用id + * @returns 应用实体数据传输对象 + */ +export function updateApi( + id: string, + input: OpenIddictApplicationUpdateDto, +): Promise { + return requestClient.put( + `/api/openiddict/applications/${id}`, + input, + ); +} + +/** + * 查询应用分页列表 + * @param input 过滤参数 + * @returns 应用实体数据传输对象分页列表 + */ +export function getPagedListApi( + input?: OpenIddictApplicationGetListInput, +): Promise> { + return requestClient.get>( + `/api/openiddict/applications`, + { + params: input, + }, + ); +} From 20fc80c827eff59d7aa58cf6c491083c67d27f59 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:16:55 +0800 Subject: [PATCH 04/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E6=9D=83=E9=99=90=E5=B8=B8=E9=87=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@abp/openiddict/src/constants/index.ts | 1 + .../@abp/openiddict/src/constants/permissions.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/constants/index.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/constants/index.ts b/apps/vben5/packages/@abp/openiddict/src/constants/index.ts new file mode 100644 index 000000000..c85954d3e --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/constants/index.ts @@ -0,0 +1 @@ +export * from './permissions'; diff --git a/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts b/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts new file mode 100644 index 000000000..dddd70bbb --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts @@ -0,0 +1,16 @@ +/** 用户权限 */ +export const IdentityUserPermissions = { + /** 新增 */ + Create: 'AbpOpenIddict.Applications.Create', + Default: 'AbpOpenIddict.Applications', + /** 删除 */ + Delete: 'AbpOpenIddict.Applications.Delete', + /** 管理功能 */ + ManageFeatures: 'AbpOpenIddict.Applications.ManageFeatures', + /** 管理权限 */ + ManagePermissions: 'AbpOpenIddict.Applications.ManagePermissions', + /** 管理密钥 */ + ManageSecret: 'AbpOpenIddict.Applications.ManageSecret', + /** 更新 */ + Update: 'AbpOpenIddict.Applications.Update', +}; From 8966c213d6e0c2c4fbf946a749029078a2eb5ae5 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:19:06 +0800 Subject: [PATCH 05/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E7=BB=84=E4=BB=B6.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/applications/ApplicationModal.vue | 7 +++++++ .../src/components/applications/ApplicationTable.vue | 7 +++++++ .../vben5/packages/@abp/openiddict/src/components/index.ts | 1 + apps/vben5/packages/@abp/openiddict/src/index.ts | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/index.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue new file mode 100644 index 000000000..1017376d1 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue new file mode 100644 index 000000000..1017376d1 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/index.ts b/apps/vben5/packages/@abp/openiddict/src/components/index.ts new file mode 100644 index 000000000..018e0abbc --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/index.ts @@ -0,0 +1 @@ +export { default as ApplicationTable } from './applications/ApplicationTable.vue'; diff --git a/apps/vben5/packages/@abp/openiddict/src/index.ts b/apps/vben5/packages/@abp/openiddict/src/index.ts index fcb073fef..c688f3a89 100644 --- a/apps/vben5/packages/@abp/openiddict/src/index.ts +++ b/apps/vben5/packages/@abp/openiddict/src/index.ts @@ -1 +1,3 @@ +export * from './components'; +export * from './constants'; export * from './types'; From d729a88bd38b50ac37e078a32a5b3707a5392cad Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 10:25:49 +0800 Subject: [PATCH 06/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E8=B7=AF=E7=94=B1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vben5/apps/app-antd/package.json | 1 + .../app-antd/src/locales/langs/en-US/abp.json | 4 ++++ .../app-antd/src/locales/langs/zh-CN/abp.json | 4 ++++ .../app-antd/src/router/routes/modules/abp.ts | 20 +++++++++++++++++++ .../views/openiddict/applications/index.vue | 15 ++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 apps/vben5/apps/app-antd/src/views/openiddict/applications/index.vue diff --git a/apps/vben5/apps/app-antd/package.json b/apps/vben5/apps/app-antd/package.json index 8b95e821b..5a2f778b9 100644 --- a/apps/vben5/apps/app-antd/package.json +++ b/apps/vben5/apps/app-antd/package.json @@ -30,6 +30,7 @@ "@abp/auditing": "workspace:*", "@abp/core": "workspace:*", "@abp/identity": "workspace:*", + "@abp/openiddict": "workspace:*", "@abp/request": "workspace:*", "@abp/ui": "workspace:*", "@vben/access": "workspace:*", diff --git a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json index f995ca518..841a8d0ab 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json @@ -11,5 +11,9 @@ "organizationUnits": "Organization Units", "auditLogs": "Audit Logs" } + }, + "openiddict": { + "title": "OpenIddict", + "applications": "Applications" } } diff --git a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json index 3f6b04aa2..cb55b88b7 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json @@ -11,5 +11,9 @@ "organizationUnits": "组织机构", "auditLogs": "审计日志" } + }, + "openiddict": { + "title": "OpenIddict", + "applications": "应用管理" } } diff --git a/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts b/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts index 457a439c5..cbb011642 100644 --- a/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts +++ b/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts @@ -92,6 +92,26 @@ const routes: RouteRecordRaw[] = [ }, ], }, + { + meta: { + title: $t('abp.openiddict.title'), + icon: 'mdi:openid', + }, + name: 'OpenIddict', + path: '/openiddict', + children: [ + { + meta: { + title: $t('abp.openiddict.applications'), + icon: 'carbon:application', + }, + name: 'OpenIddictApplications', + path: '/openiddict/applications', + component: () => + import('#/views/openiddict/applications/index.vue'), + }, + ], + }, ], }, ]; diff --git a/apps/vben5/apps/app-antd/src/views/openiddict/applications/index.vue b/apps/vben5/apps/app-antd/src/views/openiddict/applications/index.vue new file mode 100644 index 000000000..1e347ea86 --- /dev/null +++ b/apps/vben5/apps/app-antd/src/views/openiddict/applications/index.vue @@ -0,0 +1,15 @@ + + + From b9b075274dfa0f6f09e3d780ccd6194819c4fdc9 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 16:25:52 +0800 Subject: [PATCH 07/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vben5/apps/app-antd/vite.config.mts | 7 + .../packages/@abp/core/src/types/index.ts | 1 + .../packages/@abp/core/src/types/openid.ts | 28 ++ .../packages/@abp/openiddict/package.json | 3 +- .../@abp/openiddict/src/api/openid.ts | 13 + .../applications/ApplicationModal.vue | 446 +++++++++++++++++- .../applications/ApplicationTable.vue | 220 ++++++++- .../display-names/DisplayNameModal.vue | 81 ++++ .../display-names/DisplayNameTable.vue | 103 ++++ .../src/components/display-names/types.ts | 11 + .../components/properties/PropertyModal.vue | 66 +++ .../components/properties/PropertyTable.vue | 101 ++++ .../src/components/properties/types.ts | 11 + .../src/components/uris/UriModal.vue | 52 ++ .../src/components/uris/UriTable.vue | 106 +++++ .../openiddict/src/constants/permissions.ts | 4 +- 16 files changed, 1245 insertions(+), 8 deletions(-) create mode 100644 apps/vben5/packages/@abp/core/src/types/openid.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/api/openid.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameModal.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameTable.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/display-names/types.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyModal.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyTable.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/properties/types.ts create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/uris/UriModal.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/uris/UriTable.vue diff --git a/apps/vben5/apps/app-antd/vite.config.mts b/apps/vben5/apps/app-antd/vite.config.mts index 4ccb102a9..9ac834557 100644 --- a/apps/vben5/apps/app-antd/vite.config.mts +++ b/apps/vben5/apps/app-antd/vite.config.mts @@ -6,6 +6,13 @@ export default defineConfig(async () => { vite: { server: { proxy: { + '/.well-known': { + changeOrigin: true, + // rewrite: (path) => path.replace(/^\/api/, ''), + // mock代理目标地址 + target: 'http://127.0.0.1:30001/', + ws: true, + }, '/api': { changeOrigin: true, // rewrite: (path) => path.replace(/^\/api/, ''), diff --git a/apps/vben5/packages/@abp/core/src/types/index.ts b/apps/vben5/packages/@abp/core/src/types/index.ts index cde3fc4a5..b34d7c5f1 100644 --- a/apps/vben5/packages/@abp/core/src/types/index.ts +++ b/apps/vben5/packages/@abp/core/src/types/index.ts @@ -1,6 +1,7 @@ export * from './dto'; export * from './global'; export * from './localization'; +export * from './openid'; export * from './rules'; export * from './settings'; export * from './table'; diff --git a/apps/vben5/packages/@abp/core/src/types/openid.ts b/apps/vben5/packages/@abp/core/src/types/openid.ts new file mode 100644 index 000000000..e5bfca3f8 --- /dev/null +++ b/apps/vben5/packages/@abp/core/src/types/openid.ts @@ -0,0 +1,28 @@ +interface OpenIdConfiguration { + authorization_endpoint: string; + backchannel_logout_session_supported: boolean; + backchannel_logout_supported: boolean; + check_session_iframe: string; + claims_supported: string[]; + code_challenge_methods_supported: string[]; + device_authorization_endpoint: string; + end_session_endpoint: string; + frontchannel_logout_session_supported: boolean; + frontchannel_logout_supported: boolean; + grant_types_supported: string[]; + id_token_signing_alg_values_supported: string[]; + introspection_endpoint: string; + issuer: string; + jwks_uri: string; + request_parameter_supported: boolean; + response_modes_supported: string[]; + response_types_supported: string[]; + revocation_endpoint: string; + scopes_supported: string[]; + subject_types_supported: string[]; + token_endpoint: string; + token_endpoint_auth_methods_supported: string[]; + userinfo_endpoint: string; +} + +export type { OpenIdConfiguration }; diff --git a/apps/vben5/packages/@abp/openiddict/package.json b/apps/vben5/packages/@abp/openiddict/package.json index 2824afaf8..6b7e75727 100644 --- a/apps/vben5/packages/@abp/openiddict/package.json +++ b/apps/vben5/packages/@abp/openiddict/package.json @@ -32,6 +32,7 @@ "@vben/layouts": "workspace:*", "@vben/locales": "workspace:*", "ant-design-vue": "catalog:", - "vue": "catalog:*" + "vue": "catalog:*", + "vxe-table": "catalog:" } } diff --git a/apps/vben5/packages/@abp/openiddict/src/api/openid.ts b/apps/vben5/packages/@abp/openiddict/src/api/openid.ts new file mode 100644 index 000000000..b9eec4dc6 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/api/openid.ts @@ -0,0 +1,13 @@ +import type { OpenIdConfiguration } from '@abp/core'; + +import { requestClient } from '@abp/request'; + +/** + * openid发现端点 + * @returns OpenId配置数据 + */ +export function discoveryApi(): Promise { + return requestClient.get( + '/.well-known/openid-configuration', + ); +} diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue index 1017376d1..48234d459 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationModal.vue @@ -1,7 +1,449 @@ - + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue index 1017376d1..a39cd03bd 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue @@ -1,7 +1,221 @@ - + - + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameModal.vue new file mode 100644 index 000000000..1ad77f819 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameModal.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameTable.vue new file mode 100644 index 000000000..2ac62bac1 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/display-names/DisplayNameTable.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/display-names/types.ts b/apps/vben5/packages/@abp/openiddict/src/components/display-names/types.ts new file mode 100644 index 000000000..709e230cb --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/display-names/types.ts @@ -0,0 +1,11 @@ +import type { Dictionary } from '@abp/core'; + +interface DisplayNameInfo { + culture: string; + displayName: string; +} +interface DisplayNameProps { + data?: Dictionary; +} + +export type { DisplayNameInfo, DisplayNameProps }; diff --git a/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyModal.vue new file mode 100644 index 000000000..2e58c12ee --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyModal.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyTable.vue new file mode 100644 index 000000000..cd535e0fc --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/properties/PropertyTable.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/properties/types.ts b/apps/vben5/packages/@abp/openiddict/src/components/properties/types.ts new file mode 100644 index 000000000..5ab5c256b --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/properties/types.ts @@ -0,0 +1,11 @@ +import type { Dictionary } from '@abp/core'; + +interface PropertyInfo { + key: string; + value: string; +} +interface PropertyProps { + data?: Dictionary; +} + +export type { PropertyInfo, PropertyProps }; diff --git a/apps/vben5/packages/@abp/openiddict/src/components/uris/UriModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/uris/UriModal.vue new file mode 100644 index 000000000..4302457f6 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/uris/UriModal.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/uris/UriTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/uris/UriTable.vue new file mode 100644 index 000000000..956dea577 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/uris/UriTable.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts b/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts index dddd70bbb..a62eeeebf 100644 --- a/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts +++ b/apps/vben5/packages/@abp/openiddict/src/constants/permissions.ts @@ -1,5 +1,5 @@ -/** 用户权限 */ -export const IdentityUserPermissions = { +/** 应用权限 */ +export const ApplicationsPermissions = { /** 新增 */ Create: 'AbpOpenIddict.Applications.Create', Default: 'AbpOpenIddict.Applications', From cbcb191ffa6333a6aac8092239326c3dd40ca4a1 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 16:36:28 +0800 Subject: [PATCH 08/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applications/ApplicationTable.vue | 52 +++++++++++++++++-- .../permissions/PermissionModal.vue | 3 +- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue index a39cd03bd..7940f0d70 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue @@ -1,5 +1,6 @@ + diff --git a/apps/vben5/packages/@abp/permission/src/components/permissions/PermissionModal.vue b/apps/vben5/packages/@abp/permission/src/components/permissions/PermissionModal.vue index 62cf75f3f..f8d121907 100644 --- a/apps/vben5/packages/@abp/permission/src/components/permissions/PermissionModal.vue +++ b/apps/vben5/packages/@abp/permission/src/components/permissions/PermissionModal.vue @@ -48,7 +48,8 @@ const permissionTree = ref([]); const getPermissionTab = computed(() => { return (tree: PermissionTree) => { const grantCount = getGrantPermissionCount(tree); - return `${tree.displayName} (${grantCount})`; + const permissionCount = getPermissionCount(tree); + return `${tree.displayName} (${grantCount}/${permissionCount})`; }; }); From 5bc88e5698ab4a64d39d0a2e18256999d1748bdd Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 21 Dec 2024 17:04:16 +0800 Subject: [PATCH 09/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0app?= =?UTF-8?q?lications=E5=AF=86=E9=92=A5=E7=AE=A1=E7=90=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applications/ApplicationSecretModal.vue | 83 +++++++++++++++++++ .../applications/ApplicationTable.vue | 22 +++++ 2 files changed, 105 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue new file mode 100644 index 000000000..f8332a6bc --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue index 7940f0d70..93ca585da 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationTable.vue @@ -31,6 +31,7 @@ defineOptions({ const MenuItem = Menu.Item; const CheckIcon = createIconifyIcon('ant-design:check-outlined'); const CloseIcon = createIconifyIcon('ant-design:close-outlined'); +const SecretIcon = createIconifyIcon('codicon:gist-secret'); const PermissionsOutlined = createIconifyIcon('icon-park-outline:permissions'); const { hasAccessByCodes } = useAccess(); @@ -138,6 +139,11 @@ const [ApplicationModal, modalApi] = useVbenModal({ () => import('./ApplicationModal.vue'), ), }); +const [ApplicationSecretModal, secretModalApi] = useVbenModal({ + connectedComponent: defineAsyncComponent( + () => import('./ApplicationSecretModal.vue'), + ), +}); const [ApplicationPermissionModal, permissionModalApi] = useVbenModal({ connectedComponent: PermissionModal, }); @@ -182,6 +188,11 @@ const onMenuClick = (row: OpenIddictApplicationDto, info: MenuInfo) => { permissionModalApi.open(); break; } + case 'secret': { + secretModalApi.setData(row); + secretModalApi.open(); + break; + } } }; @@ -239,6 +250,16 @@ const onMenuClick = (row: OpenIddictApplicationDto, info: MenuInfo) => { From b60ecc20a87a6b61e6e66e7a54b5742e4be43be7 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 08:36:08 +0800 Subject: [PATCH 10/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=B1=BB=E5=9E=8B=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applications/ApplicationSecretModal.vue | 1 - .../openiddict/src/types/authorization.ts | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 apps/vben5/packages/@abp/openiddict/src/types/authorization.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue index f8332a6bc..cae8093ea 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/applications/ApplicationSecretModal.vue @@ -70,7 +70,6 @@ async function onSubmit(input: Record) { message.success($t('AbpUi.SavedSuccessfully')); emits('change', dto); modalApi.close(); - modalApi.close(); } diff --git a/apps/vben5/packages/@abp/openiddict/src/types/authorization.ts b/apps/vben5/packages/@abp/openiddict/src/types/authorization.ts new file mode 100644 index 000000000..eedc7712d --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/types/authorization.ts @@ -0,0 +1,29 @@ +import type { + Dictionary, + ExtensibleAuditedEntityDto, + PagedAndSortedResultRequestDto, +} from '@abp/core'; + +interface OpenIddictAuthorizationDto + extends ExtensibleAuditedEntityDto { + applicationId?: string; + creationDate?: string; + properties?: Dictionary; + scopes?: string[]; + status?: string; + subject?: string; + type?: string; +} + +interface OpenIddictAuthorizationGetListInput + extends PagedAndSortedResultRequestDto { + beginCreationTime?: string; + clientId?: string; + endCreationTime?: string; + filter?: string; + status?: string; + subject?: string; + type?: string; +} + +export type { OpenIddictAuthorizationDto, OpenIddictAuthorizationGetListInput }; From 94a7895f879409f61aedc0082554be661be6ca13 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 08:38:13 +0800 Subject: [PATCH 11/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@abp/openiddict/src/api/authorizations.ts | 43 +++++++++++++++++++ .../{authorization.ts => authorizations.ts} | 0 .../@abp/openiddict/src/types/index.ts | 1 + 3 files changed, 44 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/api/authorizations.ts rename apps/vben5/packages/@abp/openiddict/src/types/{authorization.ts => authorizations.ts} (100%) diff --git a/apps/vben5/packages/@abp/openiddict/src/api/authorizations.ts b/apps/vben5/packages/@abp/openiddict/src/api/authorizations.ts new file mode 100644 index 000000000..94540540d --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/api/authorizations.ts @@ -0,0 +1,43 @@ +import type { PagedResultDto } from '@abp/core'; + +import type { + OpenIddictAuthorizationDto, + OpenIddictAuthorizationGetListInput, +} from '../types/authorizations'; + +import { requestClient } from '@abp/request'; + +/** + * 删除授权 + * @param id 授权id + */ +export function deleteApi(id: string): Promise { + return requestClient.delete(`/api/openiddict/authorizations/${id}`); +} + +/** + * 查询授权 + * @param id 授权id + * @returns 授权实体数据传输对象 + */ +export function getApi(id: string): Promise { + return requestClient.get( + `/api/openiddict/authorizations/${id}`, + ); +} + +/** + * 查询授权分页列表 + * @param input 过滤参数 + * @returns 授权实体数据传输对象分页列表 + */ +export function getPagedListApi( + input?: OpenIddictAuthorizationGetListInput, +): Promise> { + return requestClient.get>( + `/api/openiddict/authorizations`, + { + params: input, + }, + ); +} diff --git a/apps/vben5/packages/@abp/openiddict/src/types/authorization.ts b/apps/vben5/packages/@abp/openiddict/src/types/authorizations.ts similarity index 100% rename from apps/vben5/packages/@abp/openiddict/src/types/authorization.ts rename to apps/vben5/packages/@abp/openiddict/src/types/authorizations.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/types/index.ts b/apps/vben5/packages/@abp/openiddict/src/types/index.ts index ad838b1d0..7284dba88 100644 --- a/apps/vben5/packages/@abp/openiddict/src/types/index.ts +++ b/apps/vben5/packages/@abp/openiddict/src/types/index.ts @@ -1 +1,2 @@ export * from './applications'; +export * from './authorizations'; From efd0d8c08e266f4ffbf8e9f3b14ec9f956891ad5 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 08:41:20 +0800 Subject: [PATCH 12/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=BB=84=E4=BB=B6.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authorizations/AuthorizationModal.vue | 7 + .../authorizations/AuthorizationTable.vue | 222 ++++++++++++++++++ 2 files changed, 229 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue create mode 100644 apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue diff --git a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue new file mode 100644 index 000000000..1017376d1 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue new file mode 100644 index 000000000..5b0d4f24c --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue @@ -0,0 +1,222 @@ + + + + + From d3a8a1c95fc8d7c63f041b0602666f86c23d7fee Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 08:45:19 +0800 Subject: [PATCH 13/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E8=B7=AF=E7=94=B1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app-antd/src/locales/langs/en-US/abp.json | 3 ++- .../app-antd/src/locales/langs/zh-CN/abp.json | 3 ++- .../app-antd/src/router/routes/modules/abp.ts | 10 ++++++++++ .../src/views/openiddict/authorizations/index.vue | 15 +++++++++++++++ .../@abp/openiddict/src/components/index.ts | 1 + 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 apps/vben5/apps/app-antd/src/views/openiddict/authorizations/index.vue diff --git a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json index 841a8d0ab..84e4c6eb2 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json @@ -14,6 +14,7 @@ }, "openiddict": { "title": "OpenIddict", - "applications": "Applications" + "applications": "Applications", + "authorizations": "Authorizations" } } diff --git a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json index cb55b88b7..f888d040a 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json @@ -14,6 +14,7 @@ }, "openiddict": { "title": "OpenIddict", - "applications": "应用管理" + "applications": "应用管理", + "authorizations": "授权管理" } } diff --git a/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts b/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts index cbb011642..414096bbc 100644 --- a/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts +++ b/apps/vben5/apps/app-antd/src/router/routes/modules/abp.ts @@ -110,6 +110,16 @@ const routes: RouteRecordRaw[] = [ component: () => import('#/views/openiddict/applications/index.vue'), }, + { + meta: { + title: $t('abp.openiddict.authorizations'), + icon: 'arcticons:ente-authenticator', + }, + name: 'OpenIddictAuthorizations', + path: '/openiddict/authorizations', + component: () => + import('#/views/openiddict/authorizations/index.vue'), + }, ], }, ], diff --git a/apps/vben5/apps/app-antd/src/views/openiddict/authorizations/index.vue b/apps/vben5/apps/app-antd/src/views/openiddict/authorizations/index.vue new file mode 100644 index 000000000..cb96f15fd --- /dev/null +++ b/apps/vben5/apps/app-antd/src/views/openiddict/authorizations/index.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/index.ts b/apps/vben5/packages/@abp/openiddict/src/components/index.ts index 018e0abbc..3cfe46c08 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/index.ts +++ b/apps/vben5/packages/@abp/openiddict/src/components/index.ts @@ -1 +1,2 @@ export { default as ApplicationTable } from './applications/ApplicationTable.vue'; +export { default as AuthorizationTable } from './authorizations/AuthorizationTable.vue'; From 3f6bee92647b47c257ec48e89efb2c5701e23e69 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 11:07:55 +0800 Subject: [PATCH 14/23] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E9=A2=84=E8=A7=88=E9=A1=B5=E9=9D=A2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/@abp/identity/src/api/index.ts | 1 + .../@abp/identity/src/api/users-lookup.ts | 55 ++++++ .../identity/src/constants/permissions.ts | 8 + .../vben5/packages/@abp/identity/src/index.ts | 1 + .../packages/@abp/identity/src/types/users.ts | 10 + .../packages/@abp/openiddict/package.json | 5 + .../authorizations/AuthorizationModal.vue | 151 ++++++++++++++- .../authorizations/AuthorizationTable.vue | 181 +++++++++++------- .../openiddict/src/constants/permissions.ts | 8 + apps/vben5/pnpm-workspace.yaml | 2 + 10 files changed, 355 insertions(+), 67 deletions(-) create mode 100644 apps/vben5/packages/@abp/identity/src/api/index.ts create mode 100644 apps/vben5/packages/@abp/identity/src/api/users-lookup.ts diff --git a/apps/vben5/packages/@abp/identity/src/api/index.ts b/apps/vben5/packages/@abp/identity/src/api/index.ts new file mode 100644 index 000000000..fe13a9e18 --- /dev/null +++ b/apps/vben5/packages/@abp/identity/src/api/index.ts @@ -0,0 +1 @@ +export * as userLookupApi from './users-lookup'; diff --git a/apps/vben5/packages/@abp/identity/src/api/users-lookup.ts b/apps/vben5/packages/@abp/identity/src/api/users-lookup.ts new file mode 100644 index 000000000..443970ece --- /dev/null +++ b/apps/vben5/packages/@abp/identity/src/api/users-lookup.ts @@ -0,0 +1,55 @@ +import type { ListResultDto } from '@abp/core'; + +import type { + IdentityUserDto, + UserLookupCountInput, + UserLookupSearchInput, +} from '../types/users'; + +import { requestClient } from '@abp/request'; + +/** + * 通过id查询用户 + * @param id 用户id + * @returns 用户实体数据传输对象 + */ +export function findByIdApi(id: string): Promise { + return requestClient.get(`/api/identity/users/lookup/${id}`); +} + +/** + * 通过用户名查询用户 + * @param userName 用户名 + * @returns 用户实体数据传输对象 + */ +export function findByUserNameApi(userName: string): Promise { + return requestClient.get( + `/api/identity/users/lookup/by-username/${userName}`, + ); +} + +/** + * 搜索用户列表 + * @param input 搜索过滤条件 + * @returns 用户实体数据传输对象列表 + */ +export function searchApi( + input?: UserLookupSearchInput, +): Promise> { + return requestClient.get>( + `/api/identity/users/lookup/search`, + { + params: input, + }, + ); +} + +/** + * 搜索用户数量 + * @param input 搜索过滤条件 + */ +export function countApi(input?: UserLookupCountInput): Promise { + return requestClient.get(`/api/identity/users/lookup/count`, { + params: input, + }); +} diff --git a/apps/vben5/packages/@abp/identity/src/constants/permissions.ts b/apps/vben5/packages/@abp/identity/src/constants/permissions.ts index 23faa1206..3d58d9e4b 100644 --- a/apps/vben5/packages/@abp/identity/src/constants/permissions.ts +++ b/apps/vben5/packages/@abp/identity/src/constants/permissions.ts @@ -45,3 +45,11 @@ export const SecurityLogPermissions = { /** 删除 */ Delete: 'AbpAuditing.SecurityLog.Delete', }; +/** + * 搜索用户权限 + * @deprecated 后台服务删除权限后将无法使用. + * @todo 需要检查abp框架权限定义 + */ +export const UserLookupPermissions = { + Default: 'AbpIdentity.UserLookup', +}; diff --git a/apps/vben5/packages/@abp/identity/src/index.ts b/apps/vben5/packages/@abp/identity/src/index.ts index c688f3a89..f43dbaee0 100644 --- a/apps/vben5/packages/@abp/identity/src/index.ts +++ b/apps/vben5/packages/@abp/identity/src/index.ts @@ -1,3 +1,4 @@ +export * from './api'; export * from './components'; export * from './constants'; export * from './types'; diff --git a/apps/vben5/packages/@abp/identity/src/types/users.ts b/apps/vben5/packages/@abp/identity/src/types/users.ts index 9c718cd88..b0d821947 100644 --- a/apps/vben5/packages/@abp/identity/src/types/users.ts +++ b/apps/vben5/packages/@abp/identity/src/types/users.ts @@ -90,6 +90,14 @@ interface GetUserPagedListInput extends PagedAndSortedResultRequestDto { type IdentityUserCreateDto = IdentityUserCreateOrUpdateDto; type IdentityUserUpdateDto = IdentityUserCreateOrUpdateDto; +interface UserLookupCountInput { + filter?: string; +} + +interface UserLookupSearchInput + extends UserLookupCountInput, + PagedAndSortedResultRequestDto {} + export type { ChangeMyPasswordInput, ChangeUserPasswordInput, @@ -98,4 +106,6 @@ export type { IdentityUserDto, IdentityUserOrganizationUnitUpdateDto, IdentityUserUpdateDto, + UserLookupCountInput, + UserLookupSearchInput, }; diff --git a/apps/vben5/packages/@abp/openiddict/package.json b/apps/vben5/packages/@abp/openiddict/package.json index 6b7e75727..c5e925adc 100644 --- a/apps/vben5/packages/@abp/openiddict/package.json +++ b/apps/vben5/packages/@abp/openiddict/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@abp/core": "workspace:*", + "@abp/identity": "workspace:*", "@abp/permission": "workspace:*", "@abp/request": "workspace:*", "@abp/ui": "workspace:*", @@ -32,7 +33,11 @@ "@vben/layouts": "workspace:*", "@vben/locales": "workspace:*", "ant-design-vue": "catalog:", + "lodash.debounce": "catalog:", "vue": "catalog:*", "vxe-table": "catalog:" + }, + "devDependencies": { + "@types/lodash.debounce": "catalog:" } } diff --git a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue index 1017376d1..cac36ece7 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationModal.vue @@ -1,7 +1,154 @@ - + diff --git a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue index 5b0d4f24c..eb0e28715 100644 --- a/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue +++ b/apps/vben5/packages/@abp/openiddict/src/components/authorizations/AuthorizationTable.vue @@ -1,25 +1,26 @@