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:
parent
28669dfeb2
commit
fc5111508f
|
@ -18,6 +18,7 @@
|
||||||
categories=parentCategories
|
categories=parentCategories
|
||||||
allowSubCategories=true
|
allowSubCategories=true
|
||||||
allowUncategorized=false
|
allowUncategorized=false
|
||||||
|
allowRestrictedCategories=true
|
||||||
onChange=(action (mut category.parent_category_id))
|
onChange=(action (mut category.parent_category_id))
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -138,7 +138,7 @@ export default ComboBoxComponent.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
const permissionType = this.selectKit.options.permissionType;
|
const permissionType = this.selectKit.options.permissionType;
|
||||||
if (permissionType) {
|
if (permissionType && !this.allowRestrictedCategories) {
|
||||||
return permissionType === category.permission;
|
return permissionType === category.permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue