> db.runCommand(
{ grantPrivilegesToRole: "roleName", privileges: [] })
> db.runCommand(
)
expect commands to fail, because 'privileges' array is empty. Instead, get
{ "ok" : 1 }This is a bug for the sake of consistency with other role-related commands. For example, the grantRoleToRole() and grantRoleToUser() commands will fail if you pass an empty 'roles' array to either. These commands require at least one specified granted role in order to succeed.