1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00

skip authorization in adding subscriber on targets

This commit is contained in:
Prateek Banga 2023-09-21 02:29:57 +05:30
parent 0510de5eab
commit 39854239fb

View file

@ -1568,7 +1568,7 @@ App::post('/v1/messaging/topics/:topicId/subscribers')
throw new Exception(Exception::TOPIC_NOT_FOUND);
}
$target = $dbForProject->getDocument('targets', $targetId);
$target = Authorization::skip(fn () => $dbForProject->getDocument('targets', $targetId));
if ($target->isEmpty()) {
throw new Exception(Exception::USER_TARGET_NOT_FOUND);