Opened 9 years ago

Closed 9 years ago

#2664 closed defect (fixed)

[per-object-permissions] pop admin broken (2)

Reported by: Joeboy Owned by: clong
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: UI/UX:

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 Changed 9 years ago by anonymous

  • Cc django25@… added

comment:2 Changed 9 years ago by anonymous

  • Owner changed from adrian to clong

comment:3 Changed 9 years ago by clong

  • Resolution set to fixed
  • Status changed from new to closed

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

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