diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 9a343ddd15..bbdb64f7a5 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -19,7 +19,7 @@
- [nkmerrill](https://github.com/nkmerrill)
- [TtheCreator](https://github.com/Tthecreator)
- [RazeLighter777](https://github.com/RazeLighter777)
- - [anthonylavado](https://github.com/anthonylavado)
+ - [LogicalPhallacy](https://github.com/LogicalPhallacy)
# Emby Contributors
diff --git a/src/controllers/forgotpassword.js b/src/controllers/forgotpassword.js
index fc944a410a..bb9489a11a 100644
--- a/src/controllers/forgotpassword.js
+++ b/src/controllers/forgotpassword.js
@@ -12,7 +12,7 @@ define([], function() {
});
if ("PinCode" == result.Action) {
var msg = Globalize.translate("MessageForgotPasswordFileCreated");
- return msg += "
", msg += "
", msg += result.PinFile, msg += "
", void Dashboard.alert({
+ return msg += "
", msg += "
", msg += "Enter PIN here to finish Password Reset" ,msg += "
",msg += result.PinFile, msg += "
", void Dashboard.alert({
message: msg,
title: Globalize.translate("HeaderForgotPassword")
})
diff --git a/src/scripts/useredit.js b/src/scripts/useredit.js
index 7c355078c0..356a93c4e7 100644
--- a/src/scripts/useredit.js
+++ b/src/scripts/useredit.js
@@ -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 '"
+ })
+ }
+
function loadUser(page, user) {
currentUser = user;
ApiClient.getJSON(ApiClient.getUrl("Auth/Providers")).then(function(providers) {
loadAuthProviders(page, user, providers)
});
+ ApiClient.getJSON(ApiClient.getUrl("Auth/PasswordResetProviders")).then(function(providers) {
+ loadPasswordResetProviders(page, user, providers)
+ });
ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", {
IsHidden: false
})).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.LoginAttemptsBeforeLockout = parseInt($("#txtLoginAttemptsBeforeLockout", page).val() || "0");
user.Policy.AuthenticationProviderId = page.querySelector(".selectLoginProvider").value;
+ user.Policy.PasswordResetProviderId = page.querySelector(".selectPasswordResetProvider").value;
user.Policy.EnableContentDeletion = $("#chkEnableDeleteAllFolders", page).checked();
user.Policy.EnableContentDeletionFromFolders = user.Policy.EnableContentDeletion ? [] : $(".chkFolder", page).get().filter(function(c) {
return c.checked
diff --git a/src/strings/en-us.json b/src/strings/en-us.json
index 0fa6fd87a7..d39c7f9eae 100644
--- a/src/strings/en-us.json
+++ b/src/strings/en-us.json
@@ -40,6 +40,7 @@
"AspectRatio": "Aspect ratio",
"AttributeNew": "New",
"Audio": "Audio",
+ "AuthProviderHelp": "Select an Authentication Provider to be used to authenticate this user's password",
"Auto": "Auto",
"AutoBasedOnLanguageSetting": "Auto (based on language setting)",
"Backdrop": "Backdrop",
@@ -549,6 +550,7 @@
"LabelArtistsHelp": "Separate multiple using ;",
"LabelAudio": "Audio:",
"LabelAudioLanguagePreference": "Preferred audio language:",
+ "LabelAuthProvider": "Authentication Provider:",
"LabelAutomaticallyRefreshInternetMetadataEvery": "Automatically refresh metadata from the internet:",
"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.",
@@ -746,6 +748,7 @@
"LabelParentalRating": "Parental rating:",
"LabelPassword": "Password:",
"LabelPasswordConfirm": "Password (confirm):",
+ "LabelPasswordResetProvider": "Password Reset Provider:",
"LabelPasswordRecoveryPinCode": "Pin code:",
"LabelPath": "Path:",
"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.",
"MessageNoTrailersFound": "No trailers found. Install the Trailer channel to enhance your movie experience by adding a library of internet trailers.",
"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.",
"MessagePleaseEnsureInternetMetadata": "Please ensure downloading of internet metadata is enabled.",
"MessagePleaseWait": "Please wait. This may take a minute.",
@@ -1173,6 +1176,7 @@
"PasswordResetComplete": "The password has been reset.",
"PasswordResetConfirmation": "Are you sure you wish to reset the password?",
"PasswordResetHeader": "Reset Password",
+ "PasswordResetProviderHelp": "Choose a Password Reset Provider to be used when this user requests a password reset",
"PasswordSaved": "Password saved.",
"People": "People",
"PerfectMatch": "Perfect match",
diff --git a/src/useredit.html b/src/useredit.html
index 9acf162e89..32b7d5036a 100644
--- a/src/useredit.html
+++ b/src/useredit.html
@@ -40,6 +40,12 @@