GrantEntity
Describes one privilege grant: which privilege on which object is granted to which role, and by whom.
export type GrantEntity = {
role: RoleEntity;
object: ObjectEntity;
object_name: string;
grantor: Grantor;
db_name: string;
};
FIELDS:
role (RoleEntity) -
The role the privilege is granted to. See RoleEntity.
object (ObjectEntity) -
The protected object type.
name (RbacObjects) -
The object type (an
RbacObjectsvalue, e.g.Collection,Global,User).
object_name (string) -
The name of the object the privilege applies to.
grantor (Grantor) -
Who granted the privilege.
user (User) -
The grantor. See User.
privilege (PrivilegeEntity) -
The granted privilege. See PrivilegeEntity.
db_name (string) -
The database the object belongs to.
Example
import { MilvusClient } from '@zilliz/milvus2-sdk-node';
const milvusClient = new MilvusClient({
address: 'localhost:19530',
token: 'root:Milvus',
});
const res = await milvusClient.listGrants({
roleName: 'exampleRole',
});
console.log(res.entities); // GrantEntity[]