diff options
author | Johan Lundberg <lundberg@nordu.net> | 2012-04-26 10:27:27 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2012-04-26 10:27:27 +0200 |
commit | 17da2b6d5ff9aa0f3e7d1fff63da72451e0ecadb (patch) | |
tree | a845f794a3e4ad2d7558dc876fe0baebc16c135b /src | |
parent | cff46494eedfa3649431a2d7d8321892334e67e0 (diff) |
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): |