mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-26 09:34:02 +08:00
Fix setting vault key strength is not saved
This commit is contained in:
parent
c9ad65994c
commit
a1f8ace5c1
3 changed files with 13 additions and 10 deletions
|
@ -91,12 +91,12 @@ class InternalController extends ApiController {
|
|||
*/
|
||||
public function getSettings() {
|
||||
$settings = array(
|
||||
'link_sharing_enabled' => $this->config->getAppValue('passman', 'link_sharing_enabled', 1),
|
||||
'user_sharing_enabled' => $this->config->getAppValue('passman', 'user_sharing_enabled', 1),
|
||||
'vault_key_strength' => $this->config->getAppValue('passman', 'vault_key_strength', 3),
|
||||
'check_version' => $this->config->getAppValue('passman', 'check_version', 1),
|
||||
'https_check' => $this->config->getAppValue('passman', 'https_check', 1),
|
||||
'disable_contextmenu' => $this->config->getAppValue('passman', 'disable_contextmenu', 1),
|
||||
'link_sharing_enabled' => intval($this->config->getAppValue('passman', 'link_sharing_enabled', 1)),
|
||||
'user_sharing_enabled' => intval($this->config->getAppValue('passman', 'user_sharing_enabled', 1)),
|
||||
'vault_key_strength' => intval($this->config->getAppValue('passman', 'vault_key_strength', 3)),
|
||||
'check_version' => intval($this->config->getAppValue('passman', 'check_version', 1)),
|
||||
'https_check' => intval($this->config->getAppValue('passman', 'https_check', 1)),
|
||||
'disable_contextmenu' => intval($this->config->getAppValue('passman', 'disable_contextmenu', 1)),
|
||||
);
|
||||
return new JSONResponse($settings);
|
||||
}
|
||||
|
|
|
@ -117,5 +117,8 @@ $(document).ready(function () {
|
|||
$('#passman_link_sharing_enabled').change(function () {
|
||||
settings.setAdminKey('link_sharing_enabled', ($(this).is(":checked")) ? 1 : 0);
|
||||
});
|
||||
$('#vault_key_strength').change(function () {
|
||||
settings.setAdminKey('vault_key_strength', $(this).val());
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -85,16 +85,16 @@ if ($checkVersion) {
|
|||
<p>
|
||||
<label for="vault_key_strength">Minimum vault key strength:</label>
|
||||
<select name="vault_key_strength" id="vault_key_strength">
|
||||
<option value="1" <?php if ($_['vault_key_strength'] === 1) print_unescaped('selected="selected"'); ?>>
|
||||
<option value="0">
|
||||
Poor
|
||||
</option>
|
||||
<option value="2" <?php if ($_['vault_key_strength'] === 2) print_unescaped('selected="selected"'); ?>>
|
||||
<option value="2">
|
||||
Weak
|
||||
</option>
|
||||
<option value="3" <?php if ($_['vault_key_strength'] === 3) print_unescaped('selected="selected"'); ?>>
|
||||
<option value="3">
|
||||
Good
|
||||
</option>
|
||||
<option value="4" <?php if ($_['vault_key_strength'] === 4) print_unescaped('selected="selected"'); ?>>
|
||||
<option value="4">
|
||||
Strong
|
||||
</option>
|
||||
</select>
|
||||
|
|
Loading…
Reference in a new issue