Add Setting.isResponseDenied()

This commit is contained in:
Yang Luo
2023-02-18 16:21:12 +08:00
parent 842d4865b2
commit 3a70f4e788
17 changed files with 24 additions and 17 deletions

View File

@ -23,7 +23,7 @@ const {fetch: originalFetch} = window;
const demoModeCallback = (res) => {
res.json().then(data => {
if (data.msg === "Unauthorized operation") {
if (Setting.isResponseDenied(data)) {
confirm({
title: i18next.t("general:This is a read-only demo site!"),
icon: <ExclamationCircleFilled />,