Status code when group membership is locked has changed
Summary
The group membership lock is not checked anymore in the API since gitlab-org/gitlab-ce!4833 (8.11.0).
This is not a security issue since the actual membership lock check is done in ProjectTeam#add_users
.
It was an oversight from me and it should be added back.
Possible fixes
Just re-add the check in EE with an additional if source_type == 'group'
because we don't need the check if source is a group.