Skip to content

Commit

Permalink
Rbac (#259)
Browse files Browse the repository at this point in the history
* update RBAC consts

Signed-off-by: ryjiang <[email protected]>

* add missing types

Signed-off-by: ryjiang <[email protected]>

---------

Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid authored Nov 28, 2023
1 parent 3332e1b commit 92a50c3
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions milvus/types/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit 92a50c3

Please sign in to comment.