From db223d50d3e98e20adb824bcc29d00aa59beb6e8 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 13 Jul 2022 11:50:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=99=BB=E5=BD=95=E5=90=8E=E8=8E=B7?= =?UTF-8?q?=E5=8F=96permissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/user/index.ts | 7 +++++-- src/api/login/types.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mock/user/index.ts b/mock/user/index.ts index 12a1ccb..efc289d 100644 --- a/mock/user/index.ts +++ b/mock/user/index.ts @@ -10,18 +10,21 @@ const List: { password: string role: string roleId: string + permissions: string | string[] }[] = [ { username: 'admin', password: 'admin', role: 'admin', - roleId: '1' + roleId: '1', + permissions: '*.*.*' }, { username: 'test', password: 'test', role: 'test', - roleId: '2' + roleId: '2', + permissions: ['example:dialog:create', 'example:dialog:delete'] } ] diff --git a/src/api/login/types.ts b/src/api/login/types.ts index 12730b2..446a023 100644 --- a/src/api/login/types.ts +++ b/src/api/login/types.ts @@ -8,4 +8,5 @@ export type UserType = { password: string role: string roleId: string + permissions: string | string[] }