mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
backups: Require passphrase for encryption in add repository form
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
2a2cc41f1d
commit
f2ea0b9065
@ -161,6 +161,10 @@ class AddRepositoryForm(forms.Form):
|
||||
raise forms.ValidationError(
|
||||
_('The entered encryption passphrases do not match'))
|
||||
|
||||
if self.cleaned_data.get('encryption') != 'none' and not passphrase:
|
||||
raise forms.ValidationError(
|
||||
_('Passphrase is needed for encryption.'))
|
||||
|
||||
return self.cleaned_data
|
||||
|
||||
def clean_repository(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user