mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Handle correct response code for parental control authentication failure
This commit is contained in:
parent
753bf80642
commit
4666da1d0b
@ -200,7 +200,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
||||
|
||||
var apiClient = this;
|
||||
|
||||
if (data.status === 401) {
|
||||
if (data.status === 403) {
|
||||
if (data.errorCode === "ParentalControl") {
|
||||
|
||||
var isCurrentAllowed = currentRouteInfo ? (currentRouteInfo.route.anonymous || currentRouteInfo.route.startup) : true;
|
||||
|
@ -26,7 +26,7 @@ define(["apphost", "appSettings", "dom", "connectionManager", "loading", "layout
|
||||
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
require(["toast"], function (toast) {
|
||||
var messageKey = response.status === 401 ? "MessageInvalidUser" : "MessageUnauthorizedUser"
|
||||
var messageKey = response.status === 401 ? "MessageInvalidUser" : "MessageUnauthorizedUser";
|
||||
toast(Globalize.translate(messageKey));
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user