From c356613a83c8d985c09f945cd8991cfb8fe9bee5 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 29 Mar 2020 01:00:00 +0100 Subject: [PATCH] Fix tickets permissions name --- tickets/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tickets/models.py b/tickets/models.py index 3308c6db..55827097 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -74,13 +74,13 @@ class Ticket(AclMixin, models.Model): """ Check that the user has the right to view the ticket or that it is the author""" if ( - not user_request.has_perm("tickets.view_ticket") + not user_request.has_perm("tickets.view_tickets") and self.user != user_request ): return ( False, _("You don't have the right to view other tickets than yours."), - ("tickets.view_ticket",), + ("tickets.view_tickets",), ) else: return True, None, None