[PR #831] [MERGED] FIx account creation issue after auth refactor #13051

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/831
Author: @pascal-fischer
Created: 5/2/2023
Status: Merged
Merged: 5/2/2023
Merged by: @pascal-fischer

Base: mainHead: fix/issue_with_account_creation_after_auth_refactor


📝 Commits (1)

  • f1da4fd using old isAdmin function to create account

📊 Changes

5 files changed (+21 additions, -26 deletions)

View changed files

📝 management/server/account.go (+1 -2)
📝 management/server/http/middleware/access_control.go (+2 -2)
📝 management/server/mock_server/account_mock.go (+3 -12)
📝 management/server/user.go (+4 -8)
📝 management/server/user_test.go (+11 -2)

📄 Description

Describe your changes

The isAdmin function created accounts if a user does not belong to any account. THis logic was skipped during the auth refactor. Reverted the changes to the old isAdmin logic.

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/831 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 5/2/2023 **Status:** ✅ Merged **Merged:** 5/2/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `fix/issue_with_account_creation_after_auth_refactor` --- ### 📝 Commits (1) - [`f1da4fd`](https://github.com/netbirdio/netbird/commit/f1da4fd55deef4724bcc6360a9ec5b1bbd9250db) using old isAdmin function to create account ### 📊 Changes **5 files changed** (+21 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+1 -2) 📝 `management/server/http/middleware/access_control.go` (+2 -2) 📝 `management/server/mock_server/account_mock.go` (+3 -12) 📝 `management/server/user.go` (+4 -8) 📝 `management/server/user_test.go` (+11 -2) </details> ### 📄 Description ## Describe your changes The isAdmin function created accounts if a user does not belong to any account. THis logic was skipped during the auth refactor. Reverted the changes to the old isAdmin logic. ## 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:21 -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#13051