How to forbid commit/author as another user

Hi All,

Currently we have a gitlab(10.5.4) server installed with omnibus gitlab-ce package. We are having an issue similar to below stackoverflow question:

Let’s say my user is Celal with the email address celal.sahin@foo.com & I have another colleague registered in gitlab whose name is John with the email address john.doe@foo.com.

When I set my user.name & user.email as Jonh’s, i.e.:

git config user.name “John”
git config user.email “john.doe@foo.com

Then commit & push my changes, the author of the commit will be John.

Is there a way to avoid this? To me it seems like anyone can impersonate any registered user on gitlab server by manipulation user.name & user.email.

Is there any workaround to that?

Thanks in advance!
Regards
Celal