mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Handle 403 response codes at login and display an appropriate message
This commit is contained in:
parent
6246dce320
commit
753bf80642
2 changed files with 4 additions and 2 deletions
|
@ -24,9 +24,10 @@ define(["apphost", "appSettings", "dom", "connectionManager", "loading", "layout
|
|||
page.querySelector("#txtManualPassword").value = "";
|
||||
loading.hide();
|
||||
|
||||
if (response.status === 401) {
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
require(["toast"], function (toast) {
|
||||
toast(Globalize.translate("MessageInvalidUser"));
|
||||
var messageKey = response.status === 401 ? "MessageInvalidUser" : "MessageUnauthorizedUser"
|
||||
toast(Globalize.translate(messageKey));
|
||||
});
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue