mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #211 from LogicalPhallacy/passwordresetimprovements
Adds web options to support better password resets
This commit is contained in:
commit
3cc379d0bf
5 changed files with 30 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
||||||
- [nkmerrill](https://github.com/nkmerrill)
|
- [nkmerrill](https://github.com/nkmerrill)
|
||||||
- [TtheCreator](https://github.com/Tthecreator)
|
- [TtheCreator](https://github.com/Tthecreator)
|
||||||
- [RazeLighter777](https://github.com/RazeLighter777)
|
- [RazeLighter777](https://github.com/RazeLighter777)
|
||||||
- [anthonylavado](https://github.com/anthonylavado)
|
- [LogicalPhallacy](https://github.com/LogicalPhallacy)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ define([], function() {
|
||||||
});
|
});
|
||||||
if ("PinCode" == result.Action) {
|
if ("PinCode" == result.Action) {
|
||||||
var msg = Globalize.translate("MessageForgotPasswordFileCreated");
|
var msg = Globalize.translate("MessageForgotPasswordFileCreated");
|
||||||
return msg += "<br/>", msg += "<br/>", msg += result.PinFile, msg += "<br/>", void Dashboard.alert({
|
return msg += "<br/>", msg += "<br/>", msg += "<a href=\"forgotpasswordpin.html\">Enter PIN here to finish Password Reset</a>" ,msg += "<br/>",msg += result.PinFile, msg += "<br/>", void Dashboard.alert({
|
||||||
message: msg,
|
message: msg,
|
||||||
title: Globalize.translate("HeaderForgotPassword")
|
title: Globalize.translate("HeaderForgotPassword")
|
||||||
})
|
})
|
||||||
|
|
|
@ -21,11 +21,27 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadPasswordResetProviders(page, user, providers) {
|
||||||
|
if (providers.length > 1 && !user.Policy.IsAdministrator) {
|
||||||
|
page.querySelector(".fldSelectPasswordResetProvider").classList.remove("hide");
|
||||||
|
} else {
|
||||||
|
page.querySelector(".fldSelectPasswordResetProvider").classList.add("hide");
|
||||||
|
}
|
||||||
|
var currentProviderId = user.Policy.PasswordResetProviderId;
|
||||||
|
page.querySelector(".selectPasswordResetProvider").innerHTML = providers.map(function(provider) {
|
||||||
|
var selected = (provider.Id === currentProviderId || providers.length < 2) ? " selected" : "";
|
||||||
|
return '<option value="' + provider.Id + '"' + selected + ">" + provider.Name + "</option>"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function loadUser(page, user) {
|
function loadUser(page, user) {
|
||||||
currentUser = user;
|
currentUser = user;
|
||||||
ApiClient.getJSON(ApiClient.getUrl("Auth/Providers")).then(function(providers) {
|
ApiClient.getJSON(ApiClient.getUrl("Auth/Providers")).then(function(providers) {
|
||||||
loadAuthProviders(page, user, providers)
|
loadAuthProviders(page, user, providers)
|
||||||
});
|
});
|
||||||
|
ApiClient.getJSON(ApiClient.getUrl("Auth/PasswordResetProviders")).then(function(providers) {
|
||||||
|
loadPasswordResetProviders(page, user, providers)
|
||||||
|
});
|
||||||
ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", {
|
ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", {
|
||||||
IsHidden: false
|
IsHidden: false
|
||||||
})).then(function(folders) {
|
})).then(function(folders) {
|
||||||
|
@ -92,6 +108,7 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l
|
||||||
user.Policy.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($("#txtRemoteClientBitrateLimit", page).val() || "0"));
|
user.Policy.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($("#txtRemoteClientBitrateLimit", page).val() || "0"));
|
||||||
user.Policy.LoginAttemptsBeforeLockout = parseInt($("#txtLoginAttemptsBeforeLockout", page).val() || "0");
|
user.Policy.LoginAttemptsBeforeLockout = parseInt($("#txtLoginAttemptsBeforeLockout", page).val() || "0");
|
||||||
user.Policy.AuthenticationProviderId = page.querySelector(".selectLoginProvider").value;
|
user.Policy.AuthenticationProviderId = page.querySelector(".selectLoginProvider").value;
|
||||||
|
user.Policy.PasswordResetProviderId = page.querySelector(".selectPasswordResetProvider").value;
|
||||||
user.Policy.EnableContentDeletion = $("#chkEnableDeleteAllFolders", page).checked();
|
user.Policy.EnableContentDeletion = $("#chkEnableDeleteAllFolders", page).checked();
|
||||||
user.Policy.EnableContentDeletionFromFolders = user.Policy.EnableContentDeletion ? [] : $(".chkFolder", page).get().filter(function(c) {
|
user.Policy.EnableContentDeletionFromFolders = user.Policy.EnableContentDeletion ? [] : $(".chkFolder", page).get().filter(function(c) {
|
||||||
return c.checked
|
return c.checked
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
"AspectRatio": "Aspect ratio",
|
"AspectRatio": "Aspect ratio",
|
||||||
"AttributeNew": "New",
|
"AttributeNew": "New",
|
||||||
"Audio": "Audio",
|
"Audio": "Audio",
|
||||||
|
"AuthProviderHelp": "Select an Authentication Provider to be used to authenticate this user's password",
|
||||||
"Auto": "Auto",
|
"Auto": "Auto",
|
||||||
"AutoBasedOnLanguageSetting": "Auto (based on language setting)",
|
"AutoBasedOnLanguageSetting": "Auto (based on language setting)",
|
||||||
"Backdrop": "Backdrop",
|
"Backdrop": "Backdrop",
|
||||||
|
@ -549,6 +550,7 @@
|
||||||
"LabelArtistsHelp": "Separate multiple using ;",
|
"LabelArtistsHelp": "Separate multiple using ;",
|
||||||
"LabelAudio": "Audio:",
|
"LabelAudio": "Audio:",
|
||||||
"LabelAudioLanguagePreference": "Preferred audio language:",
|
"LabelAudioLanguagePreference": "Preferred audio language:",
|
||||||
|
"LabelAuthProvider": "Authentication Provider:",
|
||||||
"LabelAutomaticallyRefreshInternetMetadataEvery": "Automatically refresh metadata from the internet:",
|
"LabelAutomaticallyRefreshInternetMetadataEvery": "Automatically refresh metadata from the internet:",
|
||||||
"LabelBindToLocalNetworkAddress": "Bind to local network address:",
|
"LabelBindToLocalNetworkAddress": "Bind to local network address:",
|
||||||
"LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Jellyfin Server.",
|
"LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Jellyfin Server.",
|
||||||
|
@ -746,6 +748,7 @@
|
||||||
"LabelParentalRating": "Parental rating:",
|
"LabelParentalRating": "Parental rating:",
|
||||||
"LabelPassword": "Password:",
|
"LabelPassword": "Password:",
|
||||||
"LabelPasswordConfirm": "Password (confirm):",
|
"LabelPasswordConfirm": "Password (confirm):",
|
||||||
|
"LabelPasswordResetProvider": "Password Reset Provider:",
|
||||||
"LabelPasswordRecoveryPinCode": "Pin code:",
|
"LabelPasswordRecoveryPinCode": "Pin code:",
|
||||||
"LabelPath": "Path:",
|
"LabelPath": "Path:",
|
||||||
"LabelPersonRole": "Role:",
|
"LabelPersonRole": "Role:",
|
||||||
|
@ -964,7 +967,7 @@
|
||||||
"MessageNoServersAvailableToConnect": "No servers are available to connect to. If you've been invited to share a server, make sure to accept it below or by clicking the link in the email.",
|
"MessageNoServersAvailableToConnect": "No servers are available to connect to. If you've been invited to share a server, make sure to accept it below or by clicking the link in the email.",
|
||||||
"MessageNoTrailersFound": "No trailers found. Install the Trailer channel to enhance your movie experience by adding a library of internet trailers.",
|
"MessageNoTrailersFound": "No trailers found. Install the Trailer channel to enhance your movie experience by adding a library of internet trailers.",
|
||||||
"MessageNothingHere": "Nothing here.",
|
"MessageNothingHere": "Nothing here.",
|
||||||
"MessagePasswordResetForUsers": "Passwords have been removed for the following users. To login, sign in with a blank password.",
|
"MessagePasswordResetForUsers": "The following users have had their passwords reset. They can now sign in with the PIN codes that were used to perform the reset.",
|
||||||
"MessagePlayAccessRestricted": "Playback of this content is currently restricted. Please contact your Jellyfin Server administrator for more information.",
|
"MessagePlayAccessRestricted": "Playback of this content is currently restricted. Please contact your Jellyfin Server administrator for more information.",
|
||||||
"MessagePleaseEnsureInternetMetadata": "Please ensure downloading of internet metadata is enabled.",
|
"MessagePleaseEnsureInternetMetadata": "Please ensure downloading of internet metadata is enabled.",
|
||||||
"MessagePleaseWait": "Please wait. This may take a minute.",
|
"MessagePleaseWait": "Please wait. This may take a minute.",
|
||||||
|
@ -1173,6 +1176,7 @@
|
||||||
"PasswordResetComplete": "The password has been reset.",
|
"PasswordResetComplete": "The password has been reset.",
|
||||||
"PasswordResetConfirmation": "Are you sure you wish to reset the password?",
|
"PasswordResetConfirmation": "Are you sure you wish to reset the password?",
|
||||||
"PasswordResetHeader": "Reset Password",
|
"PasswordResetHeader": "Reset Password",
|
||||||
|
"PasswordResetProviderHelp": "Choose a Password Reset Provider to be used when this user requests a password reset",
|
||||||
"PasswordSaved": "Password saved.",
|
"PasswordSaved": "Password saved.",
|
||||||
"People": "People",
|
"People": "People",
|
||||||
"PerfectMatch": "Perfect match",
|
"PerfectMatch": "Perfect match",
|
||||||
|
|
|
@ -40,6 +40,12 @@
|
||||||
<select class="selectLoginProvider" is="emby-select" label="${LabelAuthProvider}"></select>
|
<select class="selectLoginProvider" is="emby-select" label="${LabelAuthProvider}"></select>
|
||||||
<div class="fieldDescription">${AuthProviderHelp}</div>
|
<div class="fieldDescription">${AuthProviderHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="selectContainer fldSelectPasswordResetProvider hide">
|
||||||
|
<select class="selectPasswordResetProvider" is="emby-select" label="${LabelPasswordResetProvider}"></select>
|
||||||
|
<div class="fieldDescription">${PasswordResetProviderHelp}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription fldRemoteAccess hide">
|
<div class="checkboxContainer checkboxContainer-withDescription fldRemoteAccess hide">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" is="emby-checkbox" id="chkRemoteAccess" />
|
<input type="checkbox" is="emby-checkbox" id="chkRemoteAccess" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue