From e9d362db2914cbb16dfb81ae806ba6d2958c20df Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 17 Sep 2019 01:45:00 +0200 Subject: [PATCH] Fix Plantage, rajoute la permission view_tickets --- tickets/migrations/0001_initial.py | 1 + tickets/models.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tickets/migrations/0001_initial.py b/tickets/migrations/0001_initial.py index a2d1a5d8..67e1d0f0 100644 --- a/tickets/migrations/0001_initial.py +++ b/tickets/migrations/0001_initial.py @@ -42,6 +42,7 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'Ticket', 'verbose_name_plural': 'Tickets', + 'permissions': (('view_tickets', 'Can view a ticket object'),), 'verbose_name': 'Ticket', 'verbose_name_plural': 'Tickets', }, bases=(re2o.mixins.AclMixin, models.Model), ), diff --git a/tickets/models.py b/tickets/models.py index aa5dbd57..a3fe5e7a 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -40,6 +40,9 @@ class Ticket(AclMixin, models.Model): solved = models.BooleanField(default=False) class Meta: + permissions = ( + ("view_tickets", _("Can view a ticket object")), + ) verbose_name = _("Ticket") verbose_name_plural = _("Tickets")