[PR #815] [CLOSED] Fixing created_by field #14317

Open
opened 2026-08-05 02:09:46 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/815
Author: @pascal-fischer
Created: 4/17/2023
Status: Closed

Base: mainHead: develop/fix_created_by


📝 Commits (10+)

  • f91daed extending user endpoints to handle service users + backend
  • a02dca5 update API definition
  • 38f48a5 update account mock
  • c2f4cc7 added tests
  • d58fb4c re-enable idp lookup and filter service users
  • ae69d6d fix linter
  • dc10fc7 fix codacy
  • 372686f fix codacy
  • 89ceb48 Merge remote-tracking branch 'origin/develop/service_user_backend_and_endpoints' into develop/service_user_backend_and_endpoints
  • a241844 don't check redeem invite for service users

📊 Changes

11 files changed (+931 additions, -159 deletions)

View changed files

📝 management/server/account.go (+16 -11)
📝 management/server/activity/codes.go (+16 -0)
📝 management/server/http/api/openapi.yml (+38 -1)
📝 management/server/http/api/types.gen.go (+13 -1)
📝 management/server/http/handler.go (+1 -0)
📝 management/server/http/middleware/access_control.go (+2 -2)
📝 management/server/http/users_handler.go (+69 -12)
📝 management/server/http/users_handler_test.go (+193 -39)
📝 management/server/mock_server/account_mock.go (+18 -9)
📝 management/server/user.go (+222 -72)
📝 management/server/user_test.go (+343 -12)

📄 Description

Describe your changes

The created_by filed for PATs was storing the the target user ID instead of the execution user ID. This way UI was always showing the owner as the creator.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/815 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 4/17/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `develop/fix_created_by` --- ### 📝 Commits (10+) - [`f91daed`](https://github.com/netbirdio/netbird/commit/f91daedd265fed64ec894ed1a0e027b6e2cabba6) extending user endpoints to handle service users + backend - [`a02dca5`](https://github.com/netbirdio/netbird/commit/a02dca5c4770bd317a4e9a64a69d6e0ca4513717) update API definition - [`38f48a5`](https://github.com/netbirdio/netbird/commit/38f48a5472e343ec2f2f533e6c087f4aa3000945) update account mock - [`c2f4cc7`](https://github.com/netbirdio/netbird/commit/c2f4cc7b9b1ef59a3572db85bb4e6a8364cac49d) added tests - [`d58fb4c`](https://github.com/netbirdio/netbird/commit/d58fb4c97c640b573b18bab5102903a5837370ab) re-enable idp lookup and filter service users - [`ae69d6d`](https://github.com/netbirdio/netbird/commit/ae69d6d0da3a93284520cebf99bf71c215d44abf) fix linter - [`dc10fc7`](https://github.com/netbirdio/netbird/commit/dc10fc7c9bdba049afae966c6d69dc4bd2ff22da) fix codacy - [`372686f`](https://github.com/netbirdio/netbird/commit/372686f31739140588877b2f1f4a1863eeb854c8) fix codacy - [`89ceb48`](https://github.com/netbirdio/netbird/commit/89ceb48d42026eaf6be658f0a89fc20c6de9d43d) Merge remote-tracking branch 'origin/develop/service_user_backend_and_endpoints' into develop/service_user_backend_and_endpoints - [`a241844`](https://github.com/netbirdio/netbird/commit/a2418441d97bd3c6d66e2cfe23bbbb75d3d89dce) don't check redeem invite for service users ### 📊 Changes **11 files changed** (+931 additions, -159 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+16 -11) 📝 `management/server/activity/codes.go` (+16 -0) 📝 `management/server/http/api/openapi.yml` (+38 -1) 📝 `management/server/http/api/types.gen.go` (+13 -1) 📝 `management/server/http/handler.go` (+1 -0) 📝 `management/server/http/middleware/access_control.go` (+2 -2) 📝 `management/server/http/users_handler.go` (+69 -12) 📝 `management/server/http/users_handler_test.go` (+193 -39) 📝 `management/server/mock_server/account_mock.go` (+18 -9) 📝 `management/server/user.go` (+222 -72) 📝 `management/server/user_test.go` (+343 -12) </details> ### 📄 Description ## Describe your changes The created_by filed for PATs was storing the the target user ID instead of the execution user ID. This way UI was always showing the owner as the creator. ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:09:46 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14317