diff --git a/src/core/server/saved_objects/service/lib/search_dsl/query_params.ts b/src/core/server/saved_objects/service/lib/search_dsl/query_params.ts index 7be548e9efb9..96da76df5a68 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/query_params.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/query_params.ts @@ -287,11 +287,11 @@ export function getQueryParams({ if (ACLSearchParams) { const shouldClause: any = []; if (ACLSearchParams.permissionModes && ACLSearchParams.principals) { - const workspacePermissionDSL = ACL.generateGetPermittedSavedObjectsQueryDSL( + const permissionDSL = ACL.generateGetPermittedSavedObjectsQueryDSL( ACLSearchParams.permissionModes, ACLSearchParams.principals ); - shouldClause.push(workspacePermissionDSL.query); + shouldClause.push(permissionDSL.query); } if (ACLSearchParams.workspaces) {