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 anonymous, 18 years ago

Cc: django25@… added

comment:2 by anonymous, 18 years ago

Owner: changed from Adrian Holovaty to Chris Long

comment:3 by Chris Long, 18 years ago

Resolution: fixed
Status: newclosed

(In [3731]) [per-object-permissions] Fixes #2664 and #2663

Note: See TracTickets for help on using tickets.
Back to Top