Merge pull request #2774 from Icinga/bugfix/config-protected-vars-not-updated-2767

Bugfix/config protected vars not updated 2767
This commit is contained in:
Eric Lippmann 2017-03-28 09:38:37 +02:00
commit a2dbc457fc
3 changed files with 16 additions and 5 deletions

View File

@ -52,7 +52,7 @@ class SecurityConfigForm extends ConfigForm
'protected_customvars',
array(
'allowEmpty' => true,
'value' => '*pw*,*pass*,community',
'attribs' => array('placeholder' => $this->getDefaultProtectedCustomvars()),
'label' => $this->translate('Protected Custom Variables'),
'description' => $this->translate(
'Comma separated case insensitive list of protected custom variables.'
@ -62,4 +62,14 @@ class SecurityConfigForm extends ConfigForm
)
);
}
/**
* Return the customvars to suggest to protect when none are protected
*
* @return string
*/
public function getDefaultProtectedCustomvars()
{
return '*pw*,*pass*,community';
}
}

View File

@ -22,5 +22,6 @@ class SecurityPage extends Form
$securityConfigForm = new SecurityConfigForm();
$securityConfigForm->createElements($formData);
$this->addElements($securityConfigForm->getElements());
$this->getElement('protected_customvars')->setValue($securityConfigForm->getDefaultProtectedCustomvars());
}
}

View File

@ -36,21 +36,21 @@ input[type="submit"] {
}
input:-moz-placeholder { // FF 18-
color: inherit;
color: @gray-light;
opacity: 1;
}
input::-moz-placeholder { // FF 19+
color: inherit;
color: @gray-light;
opacity: 1;
}
input:-ms-input-placeholder {
color: inherit;
color: @gray-light;
}
input::-webkit-input-placeholder {
color: inherit;
color: @gray-light;
}
input.search {