Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[per-object-permissions] Fixes #2664 and #2663

  • Loading branch information...
1 parent aef0582 commit 5c13ad5ea2d65cd705c6362ef4194b45725177f8 Christopher Long committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/contrib/admin/views/
8 django/contrib/admin/views/
@@ -5,7 +5,7 @@
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import RowLevelPermission, User, Group
from django.db import models
-from django.contrib.admin.row_level_perm_manipulator import AddRLPManipulator, ChangeRLPManipulator
+from django.contrib.admin.row_level_perm_manipulator import AddRLPManipulator, ChangeRLPManipulator, MultipleObjSelectField
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist, PermissionDenied
from django.core.paginator import ObjectPaginator, InvalidPage
from django.contrib.admin.views.main import unquote, quote
@@ -78,12 +78,12 @@ def view_row_level_permissions(request, app_label, model_name, object_id):
group_ct = model_ct = ContentType.objects.get_for_model(Group)
user_ct = model_ct = ContentType.objects.get_for_model(User)
for r in rlp_list:
- owner_val = str(r.owner_ct)+"-"+str(r.owner_id)
+ owner_val = MultipleObjSelectField.returnKey(r.owner, r.owner_ct)
data = {'id', 'owner':owner_val, 'perm', 'negative':r.negative}
- if is
+ if ==
user_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r})
- elif is
+ elif ==
group_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r})
other_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r})

0 comments on commit 5c13ad5

Please sign in to comment.
Something went wrong with that request. Please try again.