More fixes for gitolite configuration script
More usages of undefined variable. Corrected mistake in collection of system keys.
This commit is contained in:
@@ -54,7 +54,7 @@ class Configuration {
|
||||
$this->keys_directory = "$gitolite_root/keydir";
|
||||
$this->config_file = "$gitolite_root/conf/gitolite.conf";
|
||||
|
||||
$this->system_keys = $this->getSystemPublicKeys();
|
||||
$this->collectSystemPublicKeys();
|
||||
|
||||
if (!file_exists($this->config_file)) {
|
||||
die("Not found: $this->config_file\n");
|
||||
@@ -154,7 +154,6 @@ class Configuration {
|
||||
// public key duplication in the case system key is used by phabricator user.
|
||||
protected function getSystemPublicKeys() {
|
||||
$files = scandir($this->keys_directory);
|
||||
$system_keys = array();
|
||||
foreach ($files as $file) {
|
||||
if (startswith($file, "PHAB")) {
|
||||
continue;
|
||||
@@ -167,7 +166,6 @@ class Configuration {
|
||||
$this->system_keys[$key] = $file_we;
|
||||
$this->used_keys[$file_we] = true;
|
||||
}
|
||||
return $system_keys;
|
||||
}
|
||||
|
||||
protected function removeUnusedPublicKeys() {
|
||||
@@ -324,19 +322,19 @@ function handleCustomPolicy($config, $policy) {
|
||||
$rule_type = $rule['rule'];
|
||||
if ($rule_type == 'PhabricatorPolicyRuleUsers') {
|
||||
$policy_config_user_names =
|
||||
handleUsersPolicyRule($system_keys, $rule);
|
||||
handleUsersPolicyRule($config, $rule);
|
||||
} else if ($rule_type == 'PhabricatorProjectsPolicyRule') {
|
||||
$policy_config_user_names =
|
||||
handleProjectsPolicyRule($system_keys, $rule);
|
||||
handleProjectsPolicyRule($config, $rule);
|
||||
} else if ($rule_type == 'PhabricatorProjectsAllPolicyRule') {
|
||||
$policy_config_user_names =
|
||||
handleProjectsAllPolicyRule($system_keys, $rule);
|
||||
handleProjectsAllPolicyRule($config $rule);
|
||||
} else if ($rule_type == 'PhabricatorAdministratorsPolicyRule') {
|
||||
$policy_config_user_names =
|
||||
handleAdministratorsPolicyRule($system_keys, $rule);
|
||||
handleAdministratorsPolicyRule($config, $rule);
|
||||
} else if ($rule_type == 'PhabricatorLegalpadSignaturePolicyRule') {
|
||||
$policy_config_user_names =
|
||||
handleLegalpadSignaturePolicyRule($system_keys, $rule);
|
||||
handleLegalpadSignaturePolicyRule($config, $rule);
|
||||
}
|
||||
|
||||
$config_user_names = array_merge(
|
||||
|
||||
Reference in New Issue
Block a user