mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 12:18:35 -05:00
feat: add option to only allow Plex sign-in from existing users (#1496)
* feat: add option to only allow Plex login from existing users * fix: remove newPlexLogin from public settings
This commit is contained in:
@@ -21,7 +21,7 @@ const messages = defineMessages({
|
||||
plex: 'Plex',
|
||||
plexsettings: 'Plex Settings',
|
||||
plexsettingsDescription:
|
||||
'Configure the settings for your Plex server. Overseerr scans your Plex libraries to see what content is available.',
|
||||
'Configure the settings for your Plex server. Overseerr scans your Plex libraries to determine content availability.',
|
||||
servername: 'Server Name',
|
||||
servernameTip: 'Automatically retrieved from Plex after saving',
|
||||
servernamePlaceholder: 'Plex Server Name',
|
||||
@@ -40,11 +40,10 @@ const messages = defineMessages({
|
||||
toastPlexConnectingSuccess: 'Plex connection established successfully!',
|
||||
toastPlexConnectingFailure: 'Failed to connect to Plex.',
|
||||
settingUpPlexDescription:
|
||||
'To set up Plex, you can either enter your details manually or select a server retrieved from <RegisterPlexTVLink>plex.tv</RegisterPlexTVLink>. Press the button to the right of the dropdown to fetch the list of available servers.',
|
||||
'To set up Plex, you can either enter the details manually or select a server retrieved from <RegisterPlexTVLink>plex.tv</RegisterPlexTVLink>. Press the button to the right of the dropdown to fetch the list of available servers.',
|
||||
hostname: 'Hostname or IP Address',
|
||||
port: 'Port',
|
||||
enablessl: 'Enable SSL',
|
||||
timeout: 'Timeout',
|
||||
plexlibraries: 'Plex Libraries',
|
||||
plexlibrariesDescription:
|
||||
'The libraries Overseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.',
|
||||
@@ -58,7 +57,7 @@ const messages = defineMessages({
|
||||
librariesRemaining: 'Libraries Remaining: {count}',
|
||||
startscan: 'Start Scan',
|
||||
cancelscan: 'Cancel Scan',
|
||||
validationHostnameRequired: 'You must provide a hostname or IP address',
|
||||
validationHostnameRequired: 'You must provide a valid hostname or IP address',
|
||||
validationPortRequired: 'You must provide a valid port number',
|
||||
});
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ const messages = defineMessages({
|
||||
toastSettingsSuccess: 'User settings saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
localLogin: 'Enable Local Sign-In',
|
||||
newPlexLogin: 'Enable New Plex User Sign-In',
|
||||
newPlexLoginTip: 'Allow Plex users to sign in without first being imported',
|
||||
movieRequestLimitLabel: 'Global Movie Request Limit',
|
||||
tvRequestLimitLabel: 'Global Series Request Limit',
|
||||
defaultPermissions: 'Default Permissions',
|
||||
@@ -53,6 +55,7 @@ const SettingsUsers: React.FC = () => {
|
||||
<Formik
|
||||
initialValues={{
|
||||
localLogin: data?.localLogin,
|
||||
newPlexLogin: data?.newPlexLogin,
|
||||
movieQuotaLimit: data?.defaultQuotas.movie.quotaLimit ?? 0,
|
||||
movieQuotaDays: data?.defaultQuotas.movie.quotaDays ?? 7,
|
||||
tvQuotaLimit: data?.defaultQuotas.tv.quotaLimit ?? 0,
|
||||
@@ -64,6 +67,7 @@ const SettingsUsers: React.FC = () => {
|
||||
try {
|
||||
await axios.post('/api/v1/settings/main', {
|
||||
localLogin: values.localLogin,
|
||||
newPlexLogin: values.newPlexLogin,
|
||||
defaultQuotas: {
|
||||
movie: {
|
||||
quotaLimit: values.movieQuotaLimit,
|
||||
@@ -96,7 +100,7 @@ const SettingsUsers: React.FC = () => {
|
||||
<Form className="section">
|
||||
<div className="form-row">
|
||||
<label htmlFor="localLogin" className="checkbox-label">
|
||||
<span>{intl.formatMessage(messages.localLogin)}</span>
|
||||
{intl.formatMessage(messages.localLogin)}
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<Field
|
||||
@@ -109,6 +113,24 @@ const SettingsUsers: React.FC = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="newPlexLogin" className="checkbox-label">
|
||||
{intl.formatMessage(messages.newPlexLogin)}
|
||||
<span className="label-tip">
|
||||
{intl.formatMessage(messages.newPlexLoginTip)}
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="newPlexLogin"
|
||||
name="newPlexLogin"
|
||||
onChange={() => {
|
||||
setFieldValue('newPlexLogin', !values.newPlexLogin);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="applicationTitle" className="text-label">
|
||||
{intl.formatMessage(messages.movieRequestLimitLabel)}
|
||||
|
||||
Reference in New Issue
Block a user