mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
fix(encryption): Clicking on default module sets bogus value
Fixes #44532 Helps with #43123 Also adds a warning so that people aren't confused when the "Enable server-side encryption" toggle can't be toggled anymore after encryption is enabled. Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
536aa8ae87
commit
c9ba8fc39f
1 changed files with 9 additions and 4 deletions
|
|
@ -22,8 +22,14 @@
|
|||
|
||||
<template>
|
||||
<NcSettingsSection :name="t('settings', 'Server-side encryption')"
|
||||
:description="t('settings', 'Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')"
|
||||
:description="t('settings', 'Server-side encryption makes it possible to encrypt files which are uploaded to this server.')"
|
||||
:doc-url="encryptionAdminDoc">
|
||||
<NcNoteCard type="info">
|
||||
<p>This comes with limitations like a performance penalty, so enable this only if needed.</p>
|
||||
</NcNoteCard>
|
||||
<NcNoteCard type="warning">
|
||||
<p>Once enabled, server-side encryption cannot be toggled off here. Disabling encryption requires command line access.</p>
|
||||
</NcNoteCard>
|
||||
<NcCheckboxRadioSwitch :checked="encryptionEnabled || shouldDisplayWarning"
|
||||
:disabled="encryptionEnabled"
|
||||
type="switch"
|
||||
|
|
@ -137,10 +143,9 @@ export default {
|
|||
key,
|
||||
})
|
||||
|
||||
const stringValue = value ? 'yes' : 'no'
|
||||
try {
|
||||
const { data } = await axios.post(url, {
|
||||
value: stringValue,
|
||||
value: value,
|
||||
})
|
||||
this.handleResponse({
|
||||
status: data.ocs?.meta?.status,
|
||||
|
|
@ -157,7 +162,7 @@ export default {
|
|||
},
|
||||
async enableEncryption() {
|
||||
this.encryptionEnabled = true
|
||||
await this.update('encryption_enabled', true)
|
||||
await this.update('encryption_enabled', 'yes')
|
||||
},
|
||||
async handleResponse({ status, errorMessage, error }) {
|
||||
if (status !== 'ok') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue