bcmmbaga
218345e0ff
Refactor name server groups to use store methods
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-13 20:41:30 +03:00
bcmmbaga
147971fdfe
Merge branch 'groups-get-account-refactoring' into policy-get-account-refactoring
2024-11-12 17:15:16 +03:00
bcmmbaga
ed259a6a03
Merge branch 'main' into groups-get-account-refactoring
...
# Conflicts:
# management/server/account.go
# management/server/status/error.go
2024-11-12 17:14:45 +03:00
Pascal Fischer
20a5afc359
[management] Add more logs to the peer update processes ( #2881 )
2024-11-12 14:19:22 +01:00
bcmmbaga
0c0fd380bd
Refactor policy get and save account to use store methods
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-12 11:17:16 +03:00
bcmmbaga
ffce48ca5f
Merge branch 'groups-get-account-refactoring' into policy-get-account-refactoring
2024-11-11 23:08:34 +03:00
bcmmbaga
664d1388aa
fix merge
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-11 22:29:59 +03:00
bcmmbaga
010a8bfdc1
Merge branch 'main' into groups-get-account-refactoring
...
# Conflicts:
# management/server/group.go
# management/server/group/group.go
# management/server/setupkey.go
# management/server/sql_store.go
# management/server/status/error.go
# management/server/store.go
2024-11-11 21:10:02 +03:00
Bethuel Mmbaga
6cb697eed6
[management] Refactor setup key to use store methods ( #2861 )
...
* Refactor setup key handling to use store methods
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* add lock to get account groups
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* add check for regular user
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* get only required groups for auto-group validation
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* add account lock and return auto groups map on validation
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* fix missing group removed from setup key activity
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* Remove context from DB queries
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* Add user permission check and add setup events into events to store slice
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* Retrieve all groups once during setup key auto-group validation
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* Fix lint
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
* Fix sonar
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
---------
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-11 19:46:10 +03:00
bcmmbaga
174e07fefd
Refactor posture checks to remove get and save account
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-11 12:37:19 +03:00
bcmmbaga
8126d95316
refactor GetGroupByID and add NewGroupNotFoundError
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-08 18:58:04 +03:00
bcmmbaga
389c9619af
Refactor setup key handling to use store methods
...
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com >
2024-11-08 00:31:41 +03:00
Pascal Fischer
bac95ace18
[management] Add DB access duration to logs for context cancel ( #2781 )
2024-11-01 10:58:39 +01:00
pascal-fischer
10480eb52f
[management] Setup key improvements ( #2775 )
2024-10-28 17:52:23 +01:00
pascal-fischer
d4ef84fe6e
[management] Propagate error in store errors ( #2709 )
2024-10-09 14:33:58 +02:00
pascal-fischer
6c50b0c84b
[management] Add transaction to addPeer ( #2469 )
...
This PR removes the GetAccount and SaveAccount operations from the AddPeer and instead makes use of gorm.Transaction to add the new peer.
2024-09-16 15:47:03 +02:00
Maycon Santos
da39c8bbca
Refactor login with store.SavePeer ( #2334 )
...
This pull request refactors the login functionality by integrating store.SavePeer. The changes aim to improve the handling of peer login processes, particularly focusing on synchronization and error handling.
Changes:
- Refactored login logic to use store.SavePeer.
- Added checks for login without lock for login necessary checks from the client and utilized write lock for full login flow.
- Updated error handling with status.NewPeerLoginExpiredError().
- Moved geoIP check logic to a more appropriate place.
- Removed redundant calls and improved documentation.
- Moved the code to smaller methods to improve readability.
2024-07-29 13:30:27 +02:00
pascal-fischer
521f7dd39f
Improve login performance ( #2061 )
2024-05-31 16:41:12 +02:00
Viktor Liu
b7a6cbfaa5
Add account usage logic ( #1567 )
...
---------
Co-authored-by: Yury Gargay <yury.gargay@gmail.com >
2024-02-22 12:27:08 +01:00
Misha Bragin
e914adb5cd
Move Login business logic from gRPC API to Accountmanager ( #713 )
...
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.
2023-03-03 18:35:38 +01:00
Misha Bragin
509d23c7cf
Replace gRPC errors in business logic with internal ones ( #558 )
2022-11-11 20:36:45 +01:00