Handle correct response code for parental control authentication failure

This commit is contained in:
Mark Monteiro 2020-04-13 15:37:57 -04:00
parent 753bf80642
commit 4666da1d0b
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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 {