#15809 closed New feature (invalid)
Add optional obj parameter to ModelAdmin.has_add_permission
Reported by: | Christopher Grebs | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | cg@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If one is to overwrite has_add_permission it may sometimes help to rely on an optional object parameter that is applied. For example it's required to properly check if one can add some new inline-objects on an parent object that can has a state "editable" or "not editable".
The patch is very simple and does not change any behavior.
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | add_object_has_add_perm.diff added |
---|
follow-up: 2 comment:1 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
Replying to EnTeQuAk:
damnit, just ignore it... I was wrong about the usage of that function.
What funtion i have to use to have that behaviour? When i have an InlineModelAdmin, in some circumstances i need that the has_add_permission depends on the parent obj
damnit, just ignore it... I was wrong about the usage of that function.