From 6a0b8e57c30af404e94262d93dd688a0cb535793 Mon Sep 17 00:00:00 2001 From: ryjiang Date: Fri, 24 Nov 2023 15:27:36 +0800 Subject: [PATCH 1/2] update RBAC consts Signed-off-by: ryjiang --- milvus/const/milvus.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/milvus/const/milvus.ts b/milvus/const/milvus.ts index 5f47a615..09ad991e 100644 --- a/milvus/const/milvus.ts +++ b/milvus/const/milvus.ts @@ -308,16 +308,15 @@ export enum CollectionPrivileges { DropIndex = 'DropIndex', IndexDetail = 'IndexDetail', Load = 'Load', - GetLoadingProgress = 'GetLoadingProgress', Release = 'Release', Insert = 'Insert', Delete = 'Delete', Search = 'Search', Flush = 'Flush', + FlushAll = 'FlushAll', Query = 'Query', GetStatistics = 'GetStatistics', Compaction = 'Compaction', - Alias = 'Alias', Import = 'Import', LoadBalance = 'LoadBalance', } From 354a43cde2e2c93b17c55fd1ce1105c4108f9266 Mon Sep 17 00:00:00 2001 From: ryjiang Date: Tue, 28 Nov 2023 19:25:05 +0800 Subject: [PATCH 2/2] add missing types Signed-off-by: ryjiang --- milvus/types/User.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/milvus/types/User.ts b/milvus/types/User.ts index a068a0ce..84026ea4 100644 --- a/milvus/types/User.ts +++ b/milvus/types/User.ts @@ -49,25 +49,30 @@ export interface ListCredUsersResponse extends resStatusResponse { usernames: string[]; } -type RoleEntity = { name: string }; -type User = { name: string }; -type RoleResult = { users: User[]; role: RoleEntity }; +export type RoleEntity = { name: string }; +export type User = { name: string }; +export type RoleResult = { + users: User[]; + role: RoleEntity; + entities: GrantEntity[]; +}; export interface SelectRoleResponse extends resStatusResponse { results: RoleResult[]; } -type UserResult = { user: User; roles: RoleEntity[] }; +export type UserResult = { user: User; roles: RoleEntity[] }; export interface SelectUserResponse extends resStatusResponse { results: UserResult[]; } -type ObjectEntity = { name: RbacObjects }; -type PrivilegeEntity = { name: PrivilegesTypes }; -type Grantor = { user: User; privilege: PrivilegeEntity }; -type GrantEntity = { +export type ObjectEntity = { name: RbacObjects }; +export type PrivilegeEntity = { name: PrivilegesTypes }; +export type Grantor = { user: User; privilege: PrivilegeEntity }; +export type GrantEntity = { role: RoleEntity; object: ObjectEntity; object_name: string; grantor: Grantor; + db_name: string; }; export interface SelectGrantResponse extends resStatusResponse { entities: GrantEntity[];