From 4804c7f43974087e42d61913222d5ef9711b087d Mon Sep 17 00:00:00 2001
From: Ajay <dev@ajay.app>
Date: Fri, 16 Sep 2022 22:41:39 -0400
Subject: Add option to show categories you don't have permission to submit

---
 src/components/SponsorTimeEditComponent.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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

diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx
index 61ee83b9..74ad57fd 100644
--- a/src/components/SponsorTimeEditComponent.tsx
+++ b/src/components/SponsorTimeEditComponent.tsx
@@ -404,8 +404,10 @@ 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] && (category !== "chapter" || noRefreshFetchingChaptersAllowed());
-            if ((defaultBlockCategories.includes(category) || permission !== undefined) && !permission) continue;
+            const permission = (Config.config.showCategoryWithoutPermission
+                || Config.config.permissions[category as Category]) && (category !== "chapter" || noRefreshFetchingChaptersAllowed());
+            if ((defaultBlockCategories.includes(category) 
+                || (permission !== undefined && !Config.config.showCategoryWithoutPermission)) && !permission) continue;
 
             elements.push(
                 <option value={category}
-- 
cgit v1.2.3

