Skip to content

Commit

Permalink
[dashboards] query group ids as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ar2rsawseen committed Dec 6, 2021
1 parent 59f853e commit 4403419
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/dashboards/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ plugins.setConfigs("dashboards", {
filterCond = {};

if (!member.global_admin) {
var groups = (member.group_id || []).map(group_id => group_id + "");
filterCond = {
$or: [
{owner_id: memberId},
Expand All @@ -264,8 +265,8 @@ plugins.setConfigs("dashboards", {
{shared_with_view: memberId},
{shared_email_view: memberEmail},
{shared_email_edit: memberEmail},
{shared_user_groups_edit: {$in: member.group_id || []}},
{shared_user_groups_view: {$in: member.group_id || []}}
{shared_user_groups_edit: {$in: groups}},
{shared_user_groups_view: {$in: groups}}
]
};
}
Expand Down

0 comments on commit 4403419

Please sign in to comment.