From b440519c73a64827018ce26f43e1431c5ba58a58 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Thu, 30 Apr 2020 22:00:17 +0200 Subject: [PATCH] Wrong name for basic django permission change --- tickets/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tickets/models.py b/tickets/models.py index 98a006ac..32d8894f 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -197,13 +197,13 @@ class CommentTicket(AclMixin, models.Model): """ Check that the user has the right to edit the ticket comment or that it is the author""" if ( - not user_request.has_perm("tickets.edit_commentticket") + not user_request.has_perm("tickets.change_commentticket") and (self.parent_ticket.user != user_request or self.parent_ticket.user != self.created_by) ): return ( False, _("You don't have the right to edit other tickets comments than yours."), - ("tickets.edit_commentticket",), + ("tickets.change_commentticket",), ) else: return True, None, None