FIX: show group in filter only if user can see the members list. (#16580)

This commit is contained in:
Vinoth Kannan
2022-04-28 18:27:47 +05:30
committed by GitHub
parent 9203a421ba
commit 1928bb6ac6

View File

@@ -69,12 +69,14 @@ export default Controller.extend({
loadGroups() {
if (this.currentUser) {
return Group.findAll({ ignore_automatic: true }).then((groups) => {
const groupOptions = groups.map((group) => {
return {
name: group.full_name || group.name,
id: group.name,
};
});
const groupOptions = groups
.filter((group) => group.can_see_members)
.map((group) => {
return {
name: group.full_name || group.name,
id: group.name,
};
});
this.set("groupOptions", groupOptions);
});
}