add_user()
This method associates a user with the current role. After this operation, the user can access the privileges that bind to the role.
Invocation
add_user(username)
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
username | Name of the user to be associated with the role | String | True |
Return
No return
Example
from pymilvus import connections
from pymilvus.orm.role import Role
connections.connect()
role = Role(name=role_name)
role.add_user(username)
users = role.get_users()
print(f"users added to the role: {users}")