Skip to content

Commit

Permalink
Dedupe direct/child roles in Auth pipline
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBrock committed Sep 22, 2020
1 parent 5140957 commit 0431a1a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,15 @@ Auth.prototype._generateRoleGraphPipeline = function () {
},
},
},
{
$group: {
_id: { name: '$name' },
},
},
{
$project: {
name: 1,
_id: 0,
name: '$_id.name',
},
},
],
Expand All @@ -284,9 +290,15 @@ Auth.prototype._generateRoleGraphPipeline = function () {
},
},
},
{
$group: {
_id: { name: '$name' },
},
},
{
$project: {
name: 1,
_id: 0,
name: '$_id.name',
},
},
],
Expand Down

0 comments on commit 0431a1a

Please sign in to comment.