feat: enforce telemetry-only mode and safe agent decommission lifecycle

This commit is contained in:
Buri
2026-09-04 18:17:52 +08:00
parent 3d2b27f4ec
commit 8c481985c2
8 changed files with 121 additions and 1 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ func (a *authHandler) check(ctx context.Context) (uint64, error) {
if !hasID {
s := model.Server{UUID: clientUUID, Name: petname.Generate(2, "-"), Common: model.Common{
UserID: userId,
}}
}, TelemetryOnly: true}
if err := singleton.DB.Create(&s).Error; err != nil {
return 0, status.Error(codes.Unauthenticated, err.Error())
}