Browse Source

Merge branch 'master' into dev

mailing_groups
Gabriel Detraz 6 years ago
committed by root
parent
commit
dcb51bf267
  1. 2
      pip_requirements.txt
  2. 4
      tickets/models.py

2
pip_requirements.txt

@ -1,2 +1,2 @@
django-bootstrap3 django-bootstrap3==11.1.0
django-macaddress django-macaddress

4
tickets/models.py

@ -74,13 +74,13 @@ class Ticket(AclMixin, models.Model):
""" Check that the user has the right to view the ticket """ Check that the user has the right to view the ticket
or that it is the author""" or that it is the author"""
if ( if (
not user_request.has_perm("tickets.view_ticket") not user_request.has_perm("tickets.view_tickets")
and self.user != user_request and self.user != user_request
): ):
return ( return (
False, False,
_("You don't have the right to view other tickets than yours."), _("You don't have the right to view other tickets than yours."),
("tickets.view_ticket",), ("tickets.view_tickets",),
) )
else: else:
return True, None, None return True, None, None

Loading…
Cancel
Save