mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Handle permission userinfo using new logic
This commit is contained in:
@@ -406,7 +406,10 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
)];
|
||||
|
||||
for (const category of (this.props.categoryList ?? CompileConfig.categoryList)) {
|
||||
if (category === "chapter" && !Config.config.canSubmitChapter) break;
|
||||
// If permission not loaded, treat it like we have permission except chapter
|
||||
const defaultBlockCategories = ["chapter"];
|
||||
const permission = Config.config.permissions[category as Category];
|
||||
if ((defaultBlockCategories.includes(category) || permission !== undefined) && !permission) continue;
|
||||
|
||||
elements.push(
|
||||
<option value={category}
|
||||
|
||||
Reference in New Issue
Block a user