Skip to content

Commit

Permalink
[dashboards] group_id can also be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
ar2rsawseen committed Dec 6, 2021
1 parent 4403419 commit 8875062
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/dashboards/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ plugins.setConfigs("dashboards", {
filterCond = {};

if (!member.global_admin) {
var groups = (member.group_id || []).map(group_id => group_id + "");
var groups = member.group_id || [];
if (!Array.isArray(groups)) {
groups = [groups];
}
groups = groups.map(group_id => group_id + "");
filterCond = {
$or: [
{owner_id: memberId},
Expand Down

0 comments on commit 8875062

Please sign in to comment.