Opened 5 years ago

Closed 5 years ago

#31256 closed Uncategorized (wontfix)

Inline widget permision is now based on it's foregin key.

Reported by: John Lyu Owned by: nobody
Component: contrib.admin Version: 2.1
Severity: Normal Keywords: Inlines, permision
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by John Lyu)

Use an old example:

in models.py

class Ticket(models.Model):
........

class Action(models.Model):

    ticket = models.ForeignKey(Ticket)
........

in admin.py:

class ActionInline(admin.TabularInline):
    model = Action
    extra=1
    max_num=3

class TicketAdmin(admin.ModelAdmin):

.........
        inlines = [
        ActionInline,
        ]

In version 2.1.15:

If I set current user's permisson edit_Action but no edit Ticket, I will not be able to edit actions inlines in "Change Ticket" page.

Based on https://docs.djangoproject.com/en/3.0/releases/2.1.15/, that bug fix is rude and confusing.

In fact, I can still change Action it self and indirectly "change" the page of it's parent Ticket. We should stop trigger save method in this condition instead of disable the feature.

Change History (4)

comment:1 by John Lyu, 5 years ago

Description: modified (diff)
Version: 3.02.2

comment:2 by John Lyu, 5 years ago

Description: modified (diff)

comment:3 by John Lyu, 5 years ago

Description: modified (diff)
Version: 2.22.1

comment:4 by Mariusz Felisiak, 5 years ago

Component: Uncategorizedcontrib.admin
Resolution: wontfix
Status: newclosed

I don't agree that this solution is rude. The rationale behind the Security Team decision is included in the release notes and there is not much to add.

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