mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-22 07:42:28 +00:00
Handle auth options correctly in Security Settings
(cherry picked from commit 0fad20e327503bac767c4df4c893f5e418866831) (cherry picked from commit 180dafe696be25a9903b6770997005577504a914)
This commit is contained in:
parent
c4a339f0af
commit
f040835321
2 changed files with 45 additions and 11 deletions
|
@ -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,14 +41,39 @@ 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 = [
|
||||
{ key: 'enabled', value: 'Enabled' },
|
||||
{ key: 'disabledForLocalAddresses', value: 'Disabled for Local Addresses' },
|
||||
{ key: 'disabled', value: 'Disabled' }
|
||||
{
|
||||
key: 'enabled',
|
||||
get value() {
|
||||
return translate('Enabled');
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'disabledForLocalAddresses',
|
||||
get value() {
|
||||
return translate('DisabledForLocalAddresses');
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'disabled',
|
||||
get value() {
|
||||
return translate('Disabled');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
class SecuritySettings extends Component {
|
||||
|
@ -112,7 +142,7 @@ class SecuritySettings extends Component {
|
|||
name="authenticationMethod"
|
||||
values={authenticationMethodOptions}
|
||||
helpText={translate('AuthenticationMethodHelpText')}
|
||||
helpTextWarning={authenticationRequiredWarning}
|
||||
helpTextWarning={translate('AuthenticationRequiredWarning')}
|
||||
onChange={onInputChange}
|
||||
{...authenticationMethod}
|
||||
/>
|
||||
|
@ -121,13 +151,13 @@ class SecuritySettings extends Component {
|
|||
{
|
||||
authenticationEnabled ?
|
||||
<FormGroup>
|
||||
<FormLabel>Authentication Required</FormLabel>
|
||||
<FormLabel>{translate('AuthenticationRequired')}</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="authenticationRequired"
|
||||
values={authenticationRequiredOptions}
|
||||
helpText="Change which requests authentication is required for. Do not change unless you understand the risks."
|
||||
helpText={translate('AuthenticationRequiredHelpText')}
|
||||
onChange={onInputChange}
|
||||
{...authenticationRequired}
|
||||
/>
|
||||
|
|
|
@ -103,6 +103,8 @@
|
|||
"ArtistType": "Artist Type",
|
||||
"Artists": "Artists",
|
||||
"AudioInfo": "Audio Info",
|
||||
"AuthBasic": "Basic (Browser Popup)",
|
||||
"AuthForm": "Forms (Login Page)",
|
||||
"Authentication": "Authentication",
|
||||
"AuthenticationMethodHelpText": "Require Username and Password to access Lidarr",
|
||||
"AutoAdd": "Auto Add",
|
||||
|
@ -269,6 +271,7 @@
|
|||
"DetailedProgressBarHelpText": "Show text on progess bar",
|
||||
"Details": "Details",
|
||||
"Disabled": "Disabled",
|
||||
"DisabledForLocalAddresses": "Disabled for Local Addresses",
|
||||
"Disambiguation": "Disambiguation",
|
||||
"DiscCount": "Disc Count",
|
||||
"DiscNumber": "Disc Number",
|
||||
|
@ -363,6 +366,7 @@
|
|||
"ExpandOtherByDefaultHelpText": "Other",
|
||||
"ExpandSingleByDefaultHelpText": "Singles",
|
||||
"ExportCustomFormat": "Export Custom Format",
|
||||
"External": "External",
|
||||
"ExtraFileExtensionsHelpTexts1": "Comma separated list of extra files to import (.nfo will be imported as .nfo-orig)",
|
||||
"ExtraFileExtensionsHelpTexts2": "\"Examples: \".sub",
|
||||
"FailedDownloadHandling": "Failed Download Handling",
|
||||
|
|
Loading…
Reference in a new issue