Commit Graph

15419 Commits

Author SHA1 Message Date
Jeremy Stretch 3d73b2a166 Release NetBox v4.6.4 2026-06-30 11:23:11 -04:00
Martin Hauser 1a12f687ee fix(extras): Conditionally render saved filter dropdown
Only display the saved filter dropdown in table controls when a filter
form is present and includes a filter_id field. This prevents rendering
an empty or non-functional dropdown when saved filters are unavailable.
2026-06-30 11:21:19 -04:00
Martin Hauser 8c898e7713 fix(navigation): Normalize default menu button color
Render navigation menu buttons with the secondary ghost style when their
color is unset or set to the default choice.

This fixes plugin menu buttons, which default to "default" rather than
None, while preserving explicitly configured button colors.
2026-06-30 11:21:19 -04:00
Martin Hauser f027b0b206 feat(navigation): Improve sidebar action button styling
Replace the grouped button wrapper with a semantic
`dropdown-item-buttons` container and render sidebar action buttons with
the `btn-ghost` style while preserving existing color support.

Scope dropdown item link styles to direct child anchors so nested action
buttons keep their intended styling, and reveal the buttons on hover,
active, and focus-within states.
2026-06-30 08:24:30 -04:00
Jason Novinger b86145fe54
Closes #22561: Fix AttributeError when importing IPs with is_primary/is_oob set but no device (#22564)
Move the device/VM lookup ahead of is_primary/is_oob handling and only
process those flags when a parent device or VM exists.

This avoids dereferencing None for explicit falsy CSV values such as
"false", which are not covered by the column-absent checks in
clean_is_primary() and clean_is_oob(). This also keeps the behavior
aligned with MACAddressImportForm.
2026-06-29 17:40:43 +02:00
Martin Hauser 0e5cbed3f6
Fixes #22501: Fix GraphQL API exceptions falling back to HTML error responses (#22552) 2026-06-29 03:45:30 -05:00
github-actions 34c3c81c61 Update source translation strings 2026-06-27 06:10:30 +00:00
Jeremy Stretch 4f4e97f1a6
Fixes #22530: Remove hidden select inputs from the accessibility tree (#22541) 2026-06-26 10:26:42 -07:00
Martin Hauser 9f140e6442
fix(extras): Prevent Script uploads from overwriting files (#22554)
Reject duplicate ScriptModule uploads before writing to storage to
prevent failed uploads from corrupting existing files. Add existence
check in cleanup path to avoid deleting files referenced by concurrent
uploads that won the race.

Fixes #22543
2026-06-26 10:19:12 -07:00
Jeremy Stretch 80a243045e
Fixes #22529: Ensure navigation menu is navigable via keyboard (#22540) 2026-06-26 10:14:06 -07:00
Martin Hauser 021b7c5f5b
Closes #22174: Include DNS names for primary/OOB IPs and NAT data for VDCs (#22553) 2026-06-26 11:34:30 -05:00
Jeremy Stretch 68c1153325
Closes #22526: Avoid query timeouts when updating custom fields on a large number of objects (#22556) 2026-06-26 11:22:15 -05:00
Jamie (Bear) Murphy 2f87dab011
Closes #21710: Support multi-select fields for module type profile array enums (#22495) 2026-06-26 12:19:18 -04:00
Martin Hauser 4da65854e1 feat(dcim): Add 1C8P:8C1P breakout cable profile
Introduce Breakout1C8Px8C1PCableProfile to map a single 8-position
connector to eight single-position connectors. Add profile choice,
registration, and bidirectional link peer tests for the new breakout.

Fixes #22279
2026-06-26 12:08:22 -04:00
Jeremy Stretch 1077ff7169 Fixes #22528: Fix keyboard navigation for object list tabs 2026-06-26 08:22:16 -04:00
Jeremy Stretch 76f82989bf
Fixes #22532: Ensure all empty table headers have an ARIA label (#22545) 2026-06-26 05:08:15 -05:00
github-actions 84d9c428ee Update source translation strings 2026-06-26 06:21:47 +00:00
Jeremy Stretch 9c73c7a8ae
Fixes #22531: Ensure Saved Filter selector has unique element ID (#22542) 2026-06-25 18:04:56 +02:00
Jeremy Stretch 742cd0b5b6
Fixes #22527: Notify screen reader of quick search updates (#22534) 2026-06-25 13:35:33 +02:00
bctiemann 7b1e1a1dab
Closes #22419: Replace DeprecationWarning with FutureWarning for user-facing deprecations (#22510)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 09:14:59 -05:00
github-actions f25a1c7474 Update source translation strings 2026-06-24 06:19:17 +00:00
Martin Hauser a1db254104 fix(dcim): Refresh Device search cache on VC rename
Add post_save signal handler to update cached virtual_chassis field for
member Devices when a VirtualChassis is renamed. Skip updates for
creates, raw saves, or targeted saves excluding the name field.

Fixes stale search cache entries after VirtualChassis name changes.

Fixes #22489
2026-06-23 13:58:15 -04:00
Jason Novinger d7c566aee6
Closes #22169: Cache image file size on ImageAttachment (#22465) 2026-06-23 08:40:19 -07:00
bctiemann bf78a45204
Merge pull request #22491 from JCWasmx86/22442-cache-serializers
chore(netbox): Cache serializers
2026-06-22 20:28:57 -04:00
Jason Novinger 8c73f46cc9
Fixes #22507: Check is_active in restrict() and IsSuperuser superuser bypass (#22508)
RestrictedQuerySet.restrict() and IsSuperuser short-circuited on is_superuser
without checking is_active, so a deactivated superuser was granted the full
superuser bypass. restrict() in particular fails open, returning the
unrestricted queryset. Both now also require is_active, matching the existing
guard in ObjectPermissionMixin.has_perm.
2026-06-22 22:03:33 +02:00
Jeremy Stretch a5974ee265
Fixes #21310: Fix IntegrityError exception when `AUTH_LDAP_MIRROR_GROUPS` is enabled (#22492) 2026-06-22 05:35:38 -05:00
github-actions 78d4f4765e Update source translation strings 2026-06-20 06:28:34 +00:00
Arthur Hanson 626e1ef1f8
Fixes #22439: Enforce view permissions for Custom Links (#22469)
Filter custom links by the current user's view permissions before rendering
them on object detail views and table columns.
2026-06-19 09:38:47 +02:00
Jeremy Stretch 83439ba00f
Fixes #22440: Remove errant changelog filter from OpenAPI spec (#22494) 2026-06-18 23:09:33 +02:00
Jeremy Stretch e92367b3f6
Fixes #22480: Revert forced handling of image attachments as downloads (#22493) 2026-06-18 14:09:04 -07:00
mburggraf d217acdc85
Closes #22487: Remove release notes for NetBox v2.x (#22490) 2026-06-18 14:55:59 -04:00
JCWasmx86 4e1e7e9e2e chore(netbox): Cache serializers 2026-06-18 19:41:09 +02:00
mburggraf f9ce0a6741
Closes #22464: Update Documentation to use v2 Tokens in examples (#22477) 2026-06-17 13:44:29 -07:00
Martin Hauser 0e9c99ec7a test(graphql): Add GraphQL schema coverage test framework
Introduce GraphQLSchemaCoverageTestCase to verify every model-backed
GraphQL type exposed as a root query field is covered by a test. Add
type_class and graphql_test_exempt attributes to GraphQLTestCase for
explicit type declaration and coverage exclusion. Include
graphql_object_permission_assertions flag to gate permission checks for
types not enforcing object permissions.

Fixes #22089
2026-06-17 09:34:56 -04:00
Jeremy Stretch 0c26f973ff Release v4.6.3 2026-06-16 11:59:12 -04:00
Jeremy Stretch 086b1cf34d Fixes #22466: Fix test failure against SSL-enabled PosgtreSQL 2026-06-16 11:03:14 -04:00
Brian Tiemann 61696c8633 Closes #22427: Validate JSONFilter.path; add JSONStringLookup with regex
- Add _validate_json_path(): each __-separated path segment must match
  [A-Za-z0-9_][A-Za-z0-9_-]* (allows leading underscores per Jeremy's
  suggestion; ORM operator names like 'date'/'regex' are valid JSON keys
  and are not blocked — the trailing __ JSONFilter appends makes them
  key traversal steps, not ORM transforms)
- Add JSONStringLookup: explicit string-filter type for JSONLookup.
  regex/i_regex are included (they offer no additional oracle power
  beyond starts_with, which is also present, per Jeremy's observation)
- JSONFilter.filter() validates self.path and returns empty Q() on
  invalid input rather than passing untrusted user input to the ORM
- 19 unit tests for path validation and JSONStringLookup field presence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 09:25:09 -04:00
Martin Hauser f46090076d refactor(graphql): Update filter lookups for strawberry-django 0.86
Update strawberry-graphql-django to 0.86.1 and remove redundant type
parameters from StrFilterLookup, DateFilterLookup, TimeFilterLookup, and
DatetimeFilterLookup annotations across model-backed GraphQL filters.

Add NetBox-local JSON date, time, and datetime lookup input types to
preserve the previous string-backed JSON filter schema without relying
on deprecated upstream generic lookup annotations. These local types
keep the legacy GraphQL type names and date/time sub-lookup fields
intact.

Fixes #22353
2026-06-16 08:50:03 -04:00
Jeremy Stretch 16c70c3657
Fixes #22448: Ensure all objects are escaped under handle_protectederror() (#22449) 2026-06-16 13:43:52 +02:00
Jeremy Stretch 0994ce9f0c
Closes #22457: Use `hmac.compare_digest()` to authenticate API tokens (#22458) 2026-06-16 04:51:36 -05:00
Martin Hauser 025074c390
Closes #22280: Set 91% test coverage threshold and exclude non-testable paths (#22450) 2026-06-16 04:38:21 -05:00
github-actions 1264797fa6 Update source translation strings 2026-06-16 06:47:17 +00:00
bctiemann 2d496ca069
Merge pull request #22455 from netbox-community/22451-pass-strawberry-graphql-extension-factories-instead-of
Closes #22451: Use factories for GraphQL schema extension initialization
2026-06-15 19:02:11 -04:00
Jeremy Stretch 9bfdea4787
Fixes #22454: Fix serialization of decimal custom field values (#22460) 2026-06-15 22:24:10 +02:00
Jason Novinger b7de62610f Fixes #22395: Remove unused save() override on ManagedFileForm
The method wrote uploaded files to disk via a raw open(), but no code
path reached it. Its only subclass, ScriptFileForm, overrode save() to
write through django-storages and explicitly skipped the base via
super(ManagedFileForm, self).save(). With the override gone, that call
simplifies back to a plain super().save(). A leftover from #18680, which
moved both upload paths onto django-storages but left the form-level
write in place.
2026-06-15 14:07:46 -04:00
Martin Hauser eaed2a7f8e
refactor(graphql): Use factories for schema extension initialization
Change `get_schema_extensions()` to return extension factories instead
of instances. This defers extension initialization and prevents stale
references to settings captured at import time.

Lambdas capture settings values when extensions are constructed, and
tests now instantiate extensions from factories to verify configuration.

Fixes #22451
2026-06-15 15:34:22 +02:00
Martin Hauser d7de863681
Closes #17598: Add bulk creation for VLANs (#22377) 2026-06-15 08:22:58 -05:00
Jeremy Stretch 8afbfc42d5
Fixes #22346: Return a clean error message & redirect on SSO auth failure (#22420) 2026-06-15 07:51:06 -05:00
github-actions c889e58bee Update source translation strings 2026-06-15 06:46:14 +00:00
Fabi bf1a27b89c
Fixes #22397: Fix AttributeError exception for unauthentictaed users during bulk export 2026-06-14 10:34:51 -04:00