I have tried this and it doesn't seem to work for me. I only want logins through Gitlab Oauth so I disabled creating accounts. But when I turn it back on I still get the message, "User creation has been disabled for your team. Please ask your Team Administrator for details."
I am using the gitlab-omnibus CE install of Gitlab/Mattermost. But I have only tried configuring it through System Console (an odd name for the administrative setting area).