Skip to content

Commit

Permalink
(#181) fix bug with authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
eggwhat committed May 25, 2024
1 parent 1220872 commit 9082b19
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task HandleAsync(DeleteLike command, CancellationToken cancellation
}

var identity = _appContext.Identity;
if (!identity.IsAuthenticated)
if (identity.IsAuthenticated && identity.Id != comment.StudentId)
{
throw new UnauthorizedCommentAccessException(command.CommentId, identity.Id);
}
Expand Down

0 comments on commit 9082b19

Please sign in to comment.