File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ Auth.prototype._loadUserRolesForAccess = async function () {
218
218
} ;
219
219
220
220
Auth . prototype . _generateRoleGraphPipeline = function ( ) {
221
+ const prefix = this . config . database . adapter . _collectionPrefix ;
221
222
return [
222
223
{
223
224
$match : {
@@ -226,7 +227,7 @@ Auth.prototype._generateRoleGraphPipeline = function () {
226
227
} ,
227
228
{
228
229
$graphLookup : {
229
- from : ' _Join:roles:_Role' ,
230
+ from : ` ${ prefix } _Join:roles:_Role` ,
230
231
startWith : '$owningId' ,
231
232
connectFromField : 'owningId' ,
232
233
connectToField : 'relatedId' ,
@@ -238,7 +239,7 @@ Auth.prototype._generateRoleGraphPipeline = function () {
238
239
directRoles : [
239
240
{
240
241
$lookup : {
241
- from : ' _Role' ,
242
+ from : ` ${ prefix } _Role` ,
242
243
localField : 'owningId' ,
243
244
foreignField : '_id' ,
244
245
as : 'Roles' ,
@@ -265,7 +266,7 @@ Auth.prototype._generateRoleGraphPipeline = function () {
265
266
childRoles : [
266
267
{
267
268
$lookup : {
268
- from : ' _Role' ,
269
+ from : ` ${ prefix } _Role` ,
269
270
localField : 'childRolePath.owningId' ,
270
271
foreignField : '_id' ,
271
272
as : 'Roles' ,
You can’t perform that action at this time.
0 commit comments