diff --git a/app/assets/javascripts/select-kit/components/category-chooser.js.es6 b/app/assets/javascripts/select-kit/components/category-chooser.js.es6 index 21d0e3f7991..65030131c7d 100644 --- a/app/assets/javascripts/select-kit/components/category-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/category-chooser.js.es6 @@ -14,6 +14,7 @@ export default ComboBoxComponent.extend({ rowComponent: "category-row", noneRowComponent: "none-category-row", allowSubCategories: true, + permissionType: PermissionType.FULL, init() { this._super(); @@ -94,7 +95,11 @@ export default ComboBoxComponent.extend({ return false; } - return get(c, "permission") === PermissionType.FULL; + if (this.get("permissionType")) { + return this.get("permissionType") === get(c, "permission"); + } + + return true; }); } }); diff --git a/app/assets/javascripts/select-kit/components/search-advanced-category-chooser.js.es6 b/app/assets/javascripts/select-kit/components/search-advanced-category-chooser.js.es6 index 7ed95af14a0..652ee3fce9d 100644 --- a/app/assets/javascripts/select-kit/components/search-advanced-category-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/search-advanced-category-chooser.js.es6 @@ -8,6 +8,7 @@ export default CategoryChooserComponent.extend({ rootNoneLabel: "category.all", allowUncategorized: true, clearable: true, + permissionType: null, init() { this._super();