aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-09-01 16:44:02 -0400
committerAjay <[email protected]>2022-09-01 16:44:02 -0400
commit6631dfdea3584229bba8297632078c6031096bb1 (patch)
tree5e770c01364997ef491aa9f1bda5f6da29d0b782 /src/components
parent212fbb83fef9d0358579fbbb44bfdb53a5d17829 (diff)
downloadSponsorBlock-6631dfdea3584229bba8297632078c6031096bb1.tar.gz
SponsorBlock-6631dfdea3584229bba8297632078c6031096bb1.zip
Also check license status for submitting chapter
Diffstat (limited to 'src/components')
-rw-r--r--src/components/SponsorTimeEditComponent.tsx3
1 files changed, 2 insertions, 1 deletions
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(