check old extra settings before log

This commit is contained in:
Maycon Santos
2024-01-18 10:35:57 +01:00
parent 0a9c4c1fe9
commit 93592c0950
+3 -1
View File
@@ -9,7 +9,9 @@ import (
func ValidateExtraSettings(newExtraSettings *account.ExtraSettings, oldExtraSettings *account.ExtraSettings, peers map[string]*nbpeer.Peer, userID string, accountID string, eventStore activity.Store) error {
if newExtraSettings != nil {
log.Info("extra settings are only supported on the cloud version of NetBird")
if oldExtraSettings != nil {
log.Info("extra settings are only supported on the cloud version of NetBird")
}
if newExtraSettings.PeerApprovalEnabled {
log.Info("setting peer approval to false")
newExtraSettings.PeerApprovalEnabled = false