FEATURE: do not restrict categories filtering to only FULL permission type

This commit is contained in:
Joffrey JAFFEUX 2018-01-25 12:03:13 +01:00 committed by GitHub
parent 1fac2ecb56
commit 01f9995956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@ export default ComboBoxComponent.extend({
rowComponent: "category-row", rowComponent: "category-row",
noneRowComponent: "none-category-row", noneRowComponent: "none-category-row",
allowSubCategories: true, allowSubCategories: true,
permissionType: PermissionType.FULL,
init() { init() {
this._super(); this._super();
@ -94,7 +95,11 @@ export default ComboBoxComponent.extend({
return false; return false;
} }
return get(c, "permission") === PermissionType.FULL; if (this.get("permissionType")) {
return this.get("permissionType") === get(c, "permission");
}
return true;
}); });
} }
}); });

View File

@ -8,6 +8,7 @@ export default CategoryChooserComponent.extend({
rootNoneLabel: "category.all", rootNoneLabel: "category.all",
allowUncategorized: true, allowUncategorized: true,
clearable: true, clearable: true,
permissionType: null,
init() { init() {
this._super(); this._super();