Fix duplicate system users added on every update
Was a mistake in the way how key de-duplication and non-phabricator-managed commit access was dealt with. For now simple fix: make sure user list is unique. Proper fix would require something more sophisticated.
This commit is contained in:
@@ -66,6 +66,8 @@ class Configuration {
|
||||
$this->config_file = "$gitolite_root/conf/gitolite.conf";
|
||||
|
||||
$this->collectSystemPublicKeys();
|
||||
|
||||
$this->used_keys = array();
|
||||
$this->committers = array();
|
||||
|
||||
if (!file_exists($this->config_file)) {
|
||||
@@ -121,8 +123,10 @@ class Configuration {
|
||||
$variable_name = trim($parts[0]);
|
||||
if (array_key_exists($variable_name, $this->committers)) {
|
||||
$system_committers = $this->getNonPhabtricatorUsers($parts[1]);
|
||||
$committers = implode(' ', array_merge(
|
||||
$system_committers, $this->committers[$variable_name]));
|
||||
$all_committers = array_merge(
|
||||
$system_committers, $this->committers[$variable_name]);
|
||||
$unique_committers = array_unique($all_committers);
|
||||
$committers = implode(' ', $unique_committers);
|
||||
$line = "$variable_name = $committers";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user