mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(issues): only allow edit of own comments & do not allow non-admin delete of issues with comments (#2248)
This commit is contained in:
@@ -302,7 +302,7 @@ issueRoutes.delete('/:issueId', async (req, res, next) => {
|
||||
|
||||
if (
|
||||
!req.user?.hasPermission(Permission.MANAGE_ISSUES) &&
|
||||
issue.createdBy.id !== req.user?.id
|
||||
(issue.createdBy.id !== req.user?.id || issue.comments.length > 1)
|
||||
) {
|
||||
return next({
|
||||
status: 401,
|
||||
|
Reference in New Issue
Block a user