From 6631dfdea3584229bba8297632078c6031096bb1 Mon Sep 17 00:00:00 2001
From: Ajay <dev@ajay.app>
Date: Thu, 1 Sep 2022 16:44:02 -0400
Subject: Also check license status for submitting chapter

---
 src/components/SponsorTimeEditComponent.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/SponsorTimeEditComponent.tsx')

diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx
index 1515644a..90c600af 100644
--- a/src/components/SponsorTimeEditComponent.tsx
+++ b/src/components/SponsorTimeEditComponent.tsx
@@ -7,6 +7,7 @@ import SubmissionNoticeComponent from "./SubmissionNoticeComponent";
 import { RectangleTooltip } from "../render/RectangleTooltip";
 import SelectorComponent, { SelectorOption } from "./SelectorComponent";
 import { GenericUtils } from "../utils/genericUtils";
+import { noRefreshFetchingChaptersAllowed } from "../utils/licenseKey";
 
 
 const utils = new Utils();
@@ -402,7 +403,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
         for (const category of (this.props.categoryList ?? CompileConfig.categoryList)) {
             // If permission not loaded, treat it like we have permission except chapter
             const defaultBlockCategories = ["chapter"];
-            const permission = Config.config.permissions[category as Category];
+            const permission = Config.config.permissions[category as Category] && (category !== "chapter" || noRefreshFetchingChaptersAllowed());
             if ((defaultBlockCategories.includes(category) || permission !== undefined) && !permission) continue;
 
             elements.push(
-- 
cgit v1.2.3

