Skip to content

Commit 046d119

Browse files
authored
Merge pull request #10691 from appwrite/chore-skip-auth-to-delete-vcs-lock
Skip auth check to delete vcs lock document
2 parents c80b40c + a6af0cc commit 046d119

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/controllers/api/vcs.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166

167167
$latestCommentId = \strval($github->updateComment($owner, $repositoryName, $latestCommentId, $comment->generateComment()));
168168
} finally {
169-
$dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId);
169+
Authorization::skip(fn () => $dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId));
170170
}
171171
}
172172
} else {
@@ -237,7 +237,7 @@
237237

238238
$latestCommentId = \strval($github->updateComment($owner, $repositoryName, $latestCommentId, $comment->generateComment()));
239239
} finally {
240-
$dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId);
240+
Authorization::skip(fn () => $dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId));
241241
}
242242
}
243243
}
@@ -458,7 +458,7 @@
458458
$github->updateComment($owner, $repositoryName, $latestCommentId, $comment->generateComment());
459459
}
460460
} finally {
461-
$dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId);
461+
Authorization::skip(fn () => $dbForPlatform->deleteDocument('vcsCommentLocks', $latestCommentId));
462462
}
463463
}
464464
}
@@ -1374,7 +1374,7 @@ function (GitHub $github, Request $request, Response $response, Database $dbForP
13741374
Authorization::skip(fn () => $dbForPlatform->deleteDocument('repositories', $repository->getId()));
13751375
}
13761376

1377-
$dbForPlatform->deleteDocument('installations', $installation->getId());
1377+
Authorization::skip(fn () => $dbForPlatform->deleteDocument('installations', $installation->getId()));
13781378
}
13791379
}
13801380
} elseif ($event == $github::EVENT_PULL_REQUEST) {

0 commit comments

Comments
 (0)