delete_grant = hc.delete_user_permission("test_user", ["all"], "my_test_rename", "my_database")
Result:
This method returns a Boolean value to represent whether this operation is successful. If the error pops up when revoking privilege, “ValueError” exception will be raised.
Parameter description:
Parameters | Description | Required |
---|---|---|
user_name (str) | User to whom will be revoked privileges | Yes |
privileges (list[str]) | Privilege list, including “create”, “access”, “all” | Yes |
table_name (str) | Table name | No, revokes privileges on "default" database if not specified. If user does not have privilege on "default" database, “ValueError” exception will be raised |
database_name (str) | Database where the table is created | No, defaults to "default" database |