My mistake, it seems Nodes have two tokens associated with them. One is used as I described above. The second seems to be a left over from something else. When a machine is allocated, only on the API, it sets an association between the user's token and the Node. Only the API uses this to figure out which nodes have been allocated. The nodes are already filtered by owner and state so it isn't needed. I'll create a branch to remove it.
My mistake, it seems Nodes have two tokens associated with them. One is used as I described above. The second seems to be a left over from something else. When a machine is allocated, only on the API, it sets an association between the user's token and the Node. Only the API uses this to figure out which nodes have been allocated. The nodes are already filtered by owner and state so it isn't needed. I'll create a branch to remove it.