Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rbac #259

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Rbac #259

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions milvus/const/milvus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
Expand Down
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
Loading