Opened 6 years ago
Last modified 6 years ago
#31256 closed Uncategorized
Inline widget permision is now based on it's foregin key. — at Version 3
| 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 )
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_Actionbut noedit 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 (3)
comment:1 by , 6 years ago
| Description: | modified (diff) |
|---|---|
| Version: | 3.0 → 2.2 |
comment:2 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 6 years ago
| Description: | modified (diff) |
|---|---|
| Version: | 2.2 → 2.1 |