Skip to content

Commit

Permalink
Merge pull request #183 from SaintAngeLs/(#181)_bug_fix
Browse files Browse the repository at this point in the history
(#181) fix bug with authorization
  • Loading branch information
SaintAngeLs authored May 26, 2024
2 parents 1220872 + 9082b19 commit 33bbee9
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 33bbee9

Please sign in to comment.