I recently created a mercury repository. All pusing is done via ssh. Currently, only users with an LDAP account can make changes to the repository. However, given that when compiling to a local repository, any committer name can be used using -user. There may be a situation where the committer name does not match the LDAP account name. I want to avoid this.
What would be the best way to ensure that this does not happen? Would a hook be the best way to deal with this problem? I would not want this to be a local hook, but it will work on the same machine as the repository. He will need to check if the committer name matches the LDAP account in the push event, and if it does not send the corresponding error message.
Does this seem like a reasonable way to continue or am I going to solve the problem wrong?
source
share