From 180dafe696be25a9903b6770997005577504a914 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 20 Dec 2022 11:56:04 -0600 Subject: [PATCH] Handle auth options correctly in Security Settings (cherry picked from commit 0fad20e327503bac767c4df4c893f5e418866831) --- .../src/Settings/General/SecuritySettings.js | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/frontend/src/Settings/General/SecuritySettings.js b/frontend/src/Settings/General/SecuritySettings.js index 1c0db618d..a743e953b 100644 --- a/frontend/src/Settings/General/SecuritySettings.js +++ b/frontend/src/Settings/General/SecuritySettings.js @@ -11,9 +11,7 @@ import ConfirmModal from 'Components/Modal/ConfirmModal'; import { icons, inputTypes, kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; -export const authenticationRequiredWarning = 'To prevent remote access without authentication, Radarr now requires authentication to be enabled. You can optionally disable authentication from local addresses.'; - -const authenticationMethodOptions = [ +export const authenticationMethodOptions = [ { key: 'none', get value() { @@ -21,6 +19,13 @@ const authenticationMethodOptions = [ }, isDisabled: true }, + { + key: 'external', + get value() { + return translate('External'); + }, + isHidden: true + }, { key: 'basic', get value() { @@ -36,8 +41,18 @@ const authenticationMethodOptions = [ ]; export const authenticationRequiredOptions = [ - { key: 'enabled', value: 'Enabled' }, - { key: 'disabledForLocalAddresses', value: 'Disabled for Local Addresses' } + { + key: 'enabled', + get value() { + return translate('Enabled'); + } + }, + { + key: 'disabledForLocalAddresses', + get value() { + return translate('DisabledForLocalAddresses'); + } + } ]; const certificateValidationOptions = [ @@ -50,7 +65,7 @@ const certificateValidationOptions = [ { key: 'disabledForLocalAddresses', get value() { - return translate('CertValidationNoLocal'); + return translate('DisabledForLocalAddresses'); } }, { @@ -125,7 +140,7 @@ class SecuritySettings extends Component { name="authenticationMethod" values={authenticationMethodOptions} helpText={translate('AuthenticationMethodHelpText')} - helpTextWarning={authenticationRequiredWarning} + helpTextWarning={translate('AuthenticationRequiredWarning')} onChange={onInputChange} {...authenticationMethod} /> @@ -134,13 +149,13 @@ class SecuritySettings extends Component { { authenticationEnabled ? - Authentication Required + {translate('AuthenticationRequired')}