[PR #713] [MERGED] Move Login business logic from gRPC API to Accountmanager #12912

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/713
Author: @braginini
Created: 3/1/2023
Status: Merged
Merged: 3/3/2023
Merged by: @braginini

Base: mainHead: refactor/grpc_api_layer


📝 Commits (10+)

  • 70bcc3c Move business logic from the gRPC API
  • eeb98b0 Remove unused GetNetworkMap function
  • 867927a Revert "Remove unused GetNetworkMap function"
  • d0bbd3e Return Unauthenticated when SyncPeer or LoginPeer and peer not found
  • b8abf91 Fix codacy
  • e78c6be Remove unused methods
  • da71251 Return NetworkMap on LoginPeer
  • c7e30f8 simplify getnetworkmap method
  • c5fdcba Fix compiler error
  • 230af84 Remove unused code

📊 Changes

10 files changed (+377 additions, -443 deletions)

View changed files

📝 management/server/account.go (+41 -10)
📝 management/server/account_test.go (+15 -91)
📝 management/server/dns_test.go (+2 -2)
📝 management/server/grpcserver.go (+70 -191)
📝 management/server/management_test.go (+3 -2)
📝 management/server/mock_server/account_mock.go (+20 -29)
📝 management/server/nameserver_test.go (+2 -2)
📝 management/server/peer.go (+205 -92)
📝 management/server/peer_test.go (+16 -24)
📝 management/server/status/error.go (+3 -0)

📄 Description

Describe your changes

The Management gRPC API has too much business logic happening while it has to be in the Account manager.
This also needs to make more requests to the store through the account manager.

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/713 **Author:** [@braginini](https://github.com/braginini) **Created:** 3/1/2023 **Status:** ✅ Merged **Merged:** 3/3/2023 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `refactor/grpc_api_layer` --- ### 📝 Commits (10+) - [`70bcc3c`](https://github.com/netbirdio/netbird/commit/70bcc3c2cf643c5faf35daff55aca6d70efd4e93) Move business logic from the gRPC API - [`eeb98b0`](https://github.com/netbirdio/netbird/commit/eeb98b094897eb24890fcb45c17d55cbae3f2475) Remove unused GetNetworkMap function - [`867927a`](https://github.com/netbirdio/netbird/commit/867927a16caf1cb355999dbc805e3d567bf7ce1a) Revert "Remove unused GetNetworkMap function" - [`d0bbd3e`](https://github.com/netbirdio/netbird/commit/d0bbd3e62f5e5e1f0d0aa6fe7f848f20f64cd62d) Return Unauthenticated when SyncPeer or LoginPeer and peer not found - [`b8abf91`](https://github.com/netbirdio/netbird/commit/b8abf91d6bd47193c3d28f4ccc981bc6873a280e) Fix codacy - [`e78c6be`](https://github.com/netbirdio/netbird/commit/e78c6be4e27304f954e01d67cb7948b8bfcc3ca3) Remove unused methods - [`da71251`](https://github.com/netbirdio/netbird/commit/da71251956229656880f97d34c18599dcfaa6402) Return NetworkMap on LoginPeer - [`c7e30f8`](https://github.com/netbirdio/netbird/commit/c7e30f8facd5ab0610990361c21a9966acf5dceb) simplify getnetworkmap method - [`c5fdcba`](https://github.com/netbirdio/netbird/commit/c5fdcba42976fe2309ea714f351240202d7cb36c) Fix compiler error - [`230af84`](https://github.com/netbirdio/netbird/commit/230af84610ec63dea7484dc4eca4e3727ceff435) Remove unused code ### 📊 Changes **10 files changed** (+377 additions, -443 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+41 -10) 📝 `management/server/account_test.go` (+15 -91) 📝 `management/server/dns_test.go` (+2 -2) 📝 `management/server/grpcserver.go` (+70 -191) 📝 `management/server/management_test.go` (+3 -2) 📝 `management/server/mock_server/account_mock.go` (+20 -29) 📝 `management/server/nameserver_test.go` (+2 -2) 📝 `management/server/peer.go` (+205 -92) 📝 `management/server/peer_test.go` (+16 -24) 📝 `management/server/status/error.go` (+3 -0) </details> ### 📄 Description ## Describe your changes The Management gRPC API has too much business logic happening while it has to be in the Account manager. This also needs to make more requests to the store through the account manager. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] 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:06:59 -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#12912