-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(settings): Clarify peculiarities of enabling encryption #50424
Open
susnux
wants to merge
2
commits into
master
Choose a base branch
from
fix/encryption-text
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
apps/settings/src/components/Encryption/EncryptionWarningDialog.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<script setup lang="ts"> | ||
import type { IDialogButton } from '@nextcloud/dialogs' | ||
|
||
import { t } from '@nextcloud/l10n' | ||
import { textExistingFilesNotEncrypted } from './sharedTexts.ts' | ||
import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js' | ||
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' | ||
|
||
const emit = defineEmits<{ | ||
(e: 'close', encrypt: boolean): void | ||
}>() | ||
|
||
const buttons: IDialogButton[] = [ | ||
{ | ||
label: t('settings', 'Cancel encryption'), | ||
// @ts-expect-error Needs to be fixed in the dialogs library - value is allowed but missing from the types | ||
type: 'tertiary', | ||
callback: () => emit('close', false), | ||
}, | ||
{ | ||
label: t('settings', 'Enable encryption'), | ||
type: 'error', | ||
callback: () => emit('close', true), | ||
}, | ||
] | ||
|
||
/** | ||
* When closed we need to emit the close event | ||
* @param isOpen open state of the dialog | ||
*/ | ||
function onUpdateOpen(isOpen: boolean) { | ||
if (!isOpen) { | ||
emit('close', false) | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<NcDialog :buttons="buttons" | ||
:name="t('settings', 'Confirm enabling encryption')" | ||
size="normal" | ||
@update:open="onUpdateOpen"> | ||
<NcNoteCard type="warning"> | ||
<p> | ||
{{ t('settings', 'Please read carefully before activating server-side encryption:') }} | ||
<ul> | ||
<li> | ||
{{ t('settings', 'Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.') }} | ||
</li> | ||
<li> | ||
{{ t('settings', 'Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.') }} | ||
</li> | ||
<li> | ||
{{ t('settings', 'Be aware that encryption always increases the file size.') }} | ||
</li> | ||
<li> | ||
{{ t('settings', 'It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.') }} | ||
</li> | ||
<li> | ||
{{ textExistingFilesNotEncrypted }} | ||
{{ t('settings', 'Refer to the admin documentation on how to manually also encrypt existing files.') }} | ||
</li> | ||
</ul> | ||
</p> | ||
</NcNoteCard> | ||
<p> | ||
{{ t('settings', 'This is the final warning: Do you really want to enable encryption?') }} | ||
</p> | ||
</NcDialog> | ||
</template> | ||
|
||
<style scoped> | ||
li { | ||
list-style-type: initial; | ||
margin-inline-start: 1rem; | ||
padding: 0.25rem 0; | ||
} | ||
|
||
p + p, | ||
div + p { | ||
margin-block: 0.75rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*! | ||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
import { t } from '@nextcloud/l10n' | ||
|
||
export const textExistingFilesNotEncrypted = t('settings', 'For performance reasons, when you enable encryption on a Nextcloud server only new and changed files are encrypted.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a link to the documentation?