Negative approvals required

Expected behavior

No matter how many additional users approve a merge request the merge request is marked as approved and can be merged.

Observed behavior

If 1 approval is required and several users simultaneously view the merge request and click 'approve' before reloading the page then more approvals than required are saved. This leads to a situation where the merge request 'Requires -x more approvals' message is displayed.

Next steps

Can we ensure that only the first number of required approvals are logged and throw an error on additional ones?

/cc @vsizov

Related to: gitlab-org/gitlab-ce#2419