Admin inlines do not respect group permissions
|Reported by:||julie.sparks@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I believe this may be similar to ticket #8060.
I have two models, Category and SubCategory with SubCategory having a foreignkey relationship to Category. SubCategory is set up to be edited inline with Category in the Admin interface. I have defined a Group named Supervisor which does not have permission to delete from either Category or SubCategory. When the Category is edited, the delete option is hidden for the Category, but the delete checkboxes for the SubCategories are displayed and if checked, the SubCategories are actually deleted when the category is saved (note, is_superuser is not selected).
class SubCategoryInline(admin.TabularInline): model = models.SubCategory extra=5 class CategoryAdmin(admin.ModelAdmin): inlines = [SubCategoryInline] admin.site.register(models.Category, CategoryAdmin)