summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2012-04-26 10:27:27 +0200
committerJohan Lundberg <lundberg@nordu.net>2012-04-26 10:27:27 +0200
commit17da2b6d5ff9aa0f3e7d1fff63da72451e0ecadb (patch)
treea845f794a3e4ad2d7558dc876fe0baebc16c135b
parentcff46494eedfa3649431a2d7d8321892334e67e0 (diff)
Changed the unique criteria for AccessControlEntry.HEADmaster
-rw-r--r--src/django_co_acls/models.py3
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):