Merge branch 'feat-add-messaging-collections-in-config' into feat-messages-event-config
This commit is contained in:
commit
ab655e69e6
2 changed files with 634 additions and 606 deletions
File diff suppressed because it is too large
Load diff
13
app/init.php
13
app/init.php
|
@ -522,6 +522,19 @@ Database::addFilter(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Database::addFilter(
|
||||||
|
'subQueryTargets',
|
||||||
|
function (mixed $value) {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
function (mixed $value, Document $document, Database $database) {
|
||||||
|
return Authorization::skip(fn() => $database
|
||||||
|
->find('targets', [
|
||||||
|
Query::equal('userInternalId', [$document->getInternalId()]),
|
||||||
|
Query::limit(APP_LIMIT_SUBQUERY),
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
);
|
||||||
/**
|
/**
|
||||||
* DB Formats
|
* DB Formats
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue