FIX: show group in filter only if user can see the members list. (#16580)
This commit is contained in:
parent
9203a421ba
commit
1928bb6ac6
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue