Opened 6 years ago

Closed 6 years ago

#12211 closed (duplicate)

Admin inlines do not respect group permissions

Reported by: julie.sparks@… Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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) 

Change History (1)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Yes, this is a dupe of #8060.

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