xpack.security.hasPrivileges

edit
client.xpack.security.hasPrivileges({
  user: string,
  body: object
})

Reference

user

string - Username

body

object - The privileges to test