diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/django_co_acls/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |