Skip to content

Commit 1868bf6

Browse files
committed
Fix permission check for deleted comments display.
1 parent a958d6b commit 1868bf6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/comment.js

+4
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@ async function giveForUser({ login, page = 1, type = 'photo', active = true, del
630630

631631
const canSeeDel = iAm.registered && iAm.user.login === login || iAm.isAdmin;
632632

633+
if (!canSeeDel && del) {
634+
throw new AuthorizationError();
635+
}
636+
633637
page = (Math.abs(Number(page)) || 1) - 1;
634638

635639
let comments;

0 commit comments

Comments
 (0)