mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:13:37 +08:00
FEATURE: do not restrict categories filtering to only FULL permission type
This commit is contained in:
parent
1fac2ecb56
commit
01f9995956
|
@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user