[PR #816] [MERGED] Fix created_by field #13032

Closed
opened 2026-08-05 02:07:17 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/816
Author: @pascal-fischer
Created: 4/17/2023
Status: Merged
Merged: 4/18/2023
Merged by: @pascal-fischer

Base: feature/service_user_supportHead: develop/fix_created_by


📝 Commits (2)

  • 00e0527 fix created by wrong ID and update tests
  • 7ca1eab add error handling in test

📊 Changes

2 files changed (+32 additions, -2 deletions)

View changed files

📝 management/server/user.go (+1 -1)
📝 management/server/user_test.go (+31 -1)

📄 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/816 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 4/17/2023 **Status:** ✅ Merged **Merged:** 4/18/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `feature/service_user_support` ← **Head:** `develop/fix_created_by` --- ### 📝 Commits (2) - [`00e0527`](https://github.com/netbirdio/netbird/commit/00e05278c40b63705297ebd94afad6b54960165f) fix created by wrong ID and update tests - [`7ca1eab`](https://github.com/netbirdio/netbird/commit/7ca1eabc57c5e820b4969d86ec3a3667b2492b6e) add error handling in test ### 📊 Changes **2 files changed** (+32 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `management/server/user.go` (+1 -1) 📝 `management/server/user_test.go` (+31 -1) </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:07:17 -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#13032