Add optional obj parameter to ModelAdmin.has_add_permission
|Reported by:||EnTeQuAk||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.
Change History (3)
Changed 5 years ago by EnTeQuAk
comment:1 follow-up: ↓ 2 Changed 5 years ago by EnTeQuAk
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to invalid
- Status changed from new to closed