[PR #4879] [MERGED] 4877 users api endpoint #12936

Closed
opened 2025-12-29 22:24:28 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4879
Author: @jeremystretch
Created: 7/22/2020
Status: Merged
Merged: 7/22/2020
Merged by: @jeremystretch

Base: develop-2.9Head: 4877-users-api-endpoint


📝 Commits (7)

  • 1ac215b Introduce API endpoints for Users and Groups
  • e9199d6 Look for auth model serializers in users app
  • 788f8c9 Add view_namespace attrbiute to APITestCase to override model's app_label
  • b4cf851 Add tests for users and groups API endpoints
  • 64a3bd3 Move EXEMPT_EXCLUDE_MODELS to settings; add Group and User models
  • 2cc4f03 Correct FilterSet naming
  • 79f1248 Add filter tests for group, users

📊 Changes

11 files changed (+327 additions, -37 deletions)

View changed files

📝 netbox/netbox/settings.py (+8 -0)
📝 netbox/users/api/nested_serializers.py (+6 -3)
📝 netbox/users/api/serializers.py (+26 -0)
📝 netbox/users/api/urls.py (+4 -0)
📝 netbox/users/api/views.py (+21 -1)
netbox/users/filters.py (+58 -0)
📝 netbox/users/tests/test_api.py (+55 -15)
netbox/users/tests/test_filters.py (+116 -0)
📝 netbox/utilities/api.py (+4 -3)
📝 netbox/utilities/permissions.py (+1 -7)
📝 netbox/utilities/testing/api.py (+28 -8)

📄 Description

Closes: #4877

  • Introduce REST API endpoints for Django's User and Group models
  • Extend the nested serializers for these models to reference the individual object views
  • Exclude these models from wildcard view exemption

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4879 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/22/2020 **Status:** ✅ Merged **Merged:** 7/22/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.9` ← **Head:** `4877-users-api-endpoint` --- ### 📝 Commits (7) - [`1ac215b`](https://github.com/netbox-community/netbox/commit/1ac215bf87381e1cb7d5fb93955f0d4f795b1c5a) Introduce API endpoints for Users and Groups - [`e9199d6`](https://github.com/netbox-community/netbox/commit/e9199d6ca5e35c48d8468b2d9034ed627354f813) Look for auth model serializers in users app - [`788f8c9`](https://github.com/netbox-community/netbox/commit/788f8c9a1c6268c1ed16a4a2abf933818408fb81) Add view_namespace attrbiute to APITestCase to override model's app_label - [`b4cf851`](https://github.com/netbox-community/netbox/commit/b4cf85149bb7bb36dcda53ad620921bdfba2cd74) Add tests for users and groups API endpoints - [`64a3bd3`](https://github.com/netbox-community/netbox/commit/64a3bd37e700a75ffac9a1d99232d962412d6b7f) Move EXEMPT_EXCLUDE_MODELS to settings; add Group and User models - [`2cc4f03`](https://github.com/netbox-community/netbox/commit/2cc4f032b02b06b0cb39241bfba23587f85ceb76) Correct FilterSet naming - [`79f1248`](https://github.com/netbox-community/netbox/commit/79f1248119ccc81f709aed397bc733343bdec1b8) Add filter tests for group, users ### 📊 Changes **11 files changed** (+327 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/settings.py` (+8 -0) 📝 `netbox/users/api/nested_serializers.py` (+6 -3) 📝 `netbox/users/api/serializers.py` (+26 -0) 📝 `netbox/users/api/urls.py` (+4 -0) 📝 `netbox/users/api/views.py` (+21 -1) ➕ `netbox/users/filters.py` (+58 -0) 📝 `netbox/users/tests/test_api.py` (+55 -15) ➕ `netbox/users/tests/test_filters.py` (+116 -0) 📝 `netbox/utilities/api.py` (+4 -3) 📝 `netbox/utilities/permissions.py` (+1 -7) 📝 `netbox/utilities/testing/api.py` (+28 -8) </details> ### 📄 Description ### Closes: #4877 - Introduce REST API endpoints for Django's `User` and `Group` models - Extend the nested serializers for these models to reference the individual object views - Exclude these models from wildcard view exemption --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:28 +01:00
adam closed this issue 2025-12-29 22:24:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12936