Skip to content

Commit

Permalink
fix delete permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
backface committed Jul 2, 2024
1 parent 28ca6c9 commit ef498df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def like(request, id):
@require_http_methods(["DELETE"])
def delete_comment(request, id):
comment = get_object_or_404(Comment, pk=id)
if not request.user == comment.author or request.user.is_moderator or request.user.is_superuser:
if not request.user == comment.author and not request.user.is_moderator and not request.user.is_superuser:
raise (PermissionDenied)
else:
comment.delete()
Expand Down

0 comments on commit ef498df

Please sign in to comment.