Skip to content

Closes #392: Add filtering of ACL Assignments by assigned object type - #419

Merged
pheus merged 1 commit into
featurefrom
392-filter-acl-assignments-by-object-type
Aug 31, 2026
Merged

pheus merged 1 commit into
featurefrom
392-filter-acl-assignments-by-object-type

Conversation

@pheus

@pheus pheus commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Related Issue

Closes #392

New Behavior

Adds assigned_object_type and assigned_object_type_id filters for ACL assignments.

The natural-key filter accepts one or more values in <app_label>.<model> format, while the ID filter accepts content type IDs. The ACL Assignment filter form provides a multi-select limited to the supported assignment target models.

Contrast to Current Behavior

Previously, assignments could be filtered by a specific device, interface, virtual chassis, or virtual machine, but not by the type of their assigned object.

This change makes it possible to find broader groups such as all interface assignments, all host assignments, or all assignments targeting virtual machines.

Discussion: Benefits and Drawbacks

This makes inventory and auditing queries available consistently through the UI, REST API, and saved filters.

The change is additive, does not alter existing filter behavior, and requires no database migration. Rendering the filter form requires one additional query to load the available object type choices.

Changes to the Documentation

No standalone documentation changes are required. The new options are exposed through the existing ACL Assignment filter interfaces and follow the established NetBox filter naming conventions.

Proposed Release Note Entry

Add filtering of ACL assignments by assigned object type.

Double Check

  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR targets feature (next minor release).

Introduces assigned_object_type and assigned_object_type_id filters to
ACLAssignmentFilterSet for filtering assignments by their target model.
Form limits choices to assignable models and includes comprehensive test
coverage for both filter types and unresolvable value handling.
@pheus pheus linked an issue Aug 31, 2026 that may be closed by this pull request
@pheus
pheus merged commit 646a19b into feature Aug 31, 2026
8 checks passed
@pheus
pheus deleted the 392-filter-acl-assignments-by-object-type branch August 31, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Filter ACL Assignments by assigned Object Type

1 participant