Fixes #20759: Group object types by app in permission form #775

Closed
opened 2026-04-05 17:35:09 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jnovinger on 12/5/2025

Fixes: #20759

Modified the ObjectPermissionForm to use optgroups for organizing object types by application. This shortens the display names (e.g., "permission" instead of "Authentication and Authorization | permission") while maintaining clear organization through visual grouping.

Changes:

  • Updated get_object_types_choices() to return nested optgroup structure
  • Changed AvailableOptions and SelectedOptions widgets to handle optgroups
  • Modified TypeScript moveOptions to preserve optgroup structure
  • Added hover text showing full model names
*Originally created by @jnovinger on 12/5/2025* ### Fixes: #20759 Modified the `ObjectPermissionForm` to use `optgroups` for organizing object types by application. This shortens the display names (e.g., "permission" instead of "Authentication and Authorization | permission") while maintaining clear organization through visual grouping. Changes: - Updated `get_object_types_choices()` to return nested `optgroup` structure - Changed `AvailableOptions` and `SelectedOptions` widgets to handle `optgroups` - Modified TypeScript `moveOptions` to preserve `optgroup` structure - Added hover text showing full model names
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#775