summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Long <indirecthit@gmail.com>2006-08-14 23:21:10 +0000
committerChristopher Long <indirecthit@gmail.com>2006-08-14 23:21:10 +0000
commit8cd0dbdfce540366d885861151fcadaca54983c7 (patch)
tree2b56da1a29e736992293770cfdd36b8c927caa5f
parent77eda0234e59ad009b5922d770e8b10a4125e80e (diff)
downloaddjango-8cd0dbdfce540366d885861151fcadaca54983c7.tar.gz
[per-object-permissions] Corrected bug in creating of default row level perms that would cause no permission to be found due to capitalization
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/auth/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index bef13f4862..2fc889ec79 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -65,10 +65,10 @@ class RowLevelPermissionManager(models.Manager):
ret_dict = {}
model_ct = ContentType.objects.get_for_model(model_instance)
if change:
- change_str = "change_%s" % (model_ct)
+ change_str = "change_%s" % (model_ct.model)
ret_dict[change_str]=self.create_row_level_permission(model_instance, owner, change_str, negative=negChange)
if delete:
- delete_str = "delete_%s" % (model_ct)
+ delete_str = "delete_%s" % (model_ct.model)
ret_dict[delete_str]=self.create_row_level_permission(model_instance, owner, delete_str, negative=negDel)
return ret_dict