Opened 18 years ago
Closed 18 years ago
#2664 closed defect (fixed)
[per-object-permissions] pop admin broken (2)
Reported by: | Joeboy | Owned by: | Chris Long |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | per-object-permissions, row-level |
Cc: | django25@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This snippet from row_level_permissions.py looks wrong:
if r.owner_ct.id is user_ct.id: user_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r}) elif r.owner_ct.id is group_ct.id: group_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r}) else: other_rlp_form_list.append({'form':forms.FormWrapper(edit_rlp_manip, data, rlp_errors), 'rlp':r})
as the ifs never evaluate to true. If I change the is's to =='s then they do evaluate to true when expected.
Change History (3)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
Owner: | changed from | to
---|
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [3731]) [per-object-permissions] Fixes #2664 and #2663