From 17da2b6d5ff9aa0f3e7d1fff63da72451e0ecadb Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Thu, 26 Apr 2012 10:27:27 +0200 Subject: Changed the unique criteria for AccessControlEntry. --- src/django_co_acls/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/django_co_acls/models.py') diff --git a/src/django_co_acls/models.py b/src/django_co_acls/models.py index fee26e3..07b2668 100644 --- a/src/django_co_acls/models.py +++ b/src/django_co_acls/models.py @@ -29,7 +29,8 @@ class AccessControlEntry(models.Model): return "%s is allowed to %s %s" % ('anyone',self.permission,self.content_object) class Meta: - unique_together = (('group','permission'),('user','permission')) + unique_together = (('content_type','object_id','group','permission'), + ('content_type','object_id','user','permission')) def allow(object,ug,permission): if isinstance(ug, Group): -- cgit v1.1