FIX: allow mods to choose restricted categories as parent category.

Currently moderators can't choose a category with only “See” permission as a parent in `edit-category` modal.
This commit is contained in:
Vinoth Kannan 2020-08-12 20:58:52 +05:30
parent 28669dfeb2
commit fc5111508f
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@
categories=parentCategories
allowSubCategories=true
allowUncategorized=false
allowRestrictedCategories=true
onChange=(action (mut category.parent_category_id))
}}
</section>

View File

@ -138,7 +138,7 @@ export default ComboBoxComponent.extend({
}
const permissionType = this.selectKit.options.permissionType;
if (permissionType) {
if (permissionType && !this.allowRestrictedCategories) {
return permissionType === category.permission;
}