aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SponsorTimeEditComponent.tsx
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-09-16 22:41:39 -0400
committerAjay <[email protected]>2022-09-16 22:41:39 -0400
commit4804c7f43974087e42d61913222d5ef9711b087d (patch)
treeeee0ab2c9b0479388732f35c4584b3df2eeab084 /src/components/SponsorTimeEditComponent.tsx
parent47f685bcdda19a14957a388ca6c27832173128da (diff)
downloadSponsorBlock-4804c7f43974087e42d61913222d5ef9711b087d.tar.gz
SponsorBlock-4804c7f43974087e42d61913222d5ef9711b087d.zip
Add option to show categories you don't have permission to submit
Diffstat (limited to 'src/components/SponsorTimeEditComponent.tsx')
-rw-r--r--src/components/SponsorTimeEditComponent.tsx6
1 files changed, 4 insertions, 2 deletions
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}