diff --git a/management/server/account.go b/management/server/account.go index 1563570fa..12198d726 100644 --- a/management/server/account.go +++ b/management/server/account.go @@ -24,6 +24,7 @@ import ( "github.com/netbirdio/netbird/base62" nbdns "github.com/netbirdio/netbird/dns" + "github.com/netbirdio/netbird/management/server/account" "github.com/netbirdio/netbird/management/server/activity" "github.com/netbirdio/netbird/management/server/idp" "github.com/netbirdio/netbird/management/server/jwtclaims" @@ -162,7 +163,7 @@ type Settings struct { JWTGroupsClaimName string // Extra is a dictionary of Account settings - Extra *ExtraSettings + Extra *account.ExtraSettings } // Copy copies the Settings struct @@ -180,18 +181,6 @@ func (s *Settings) Copy() *Settings { return settings } -type ExtraSettings struct { - // PeerApprovalEnabled enables or disables the need for peers bo be approved by an administrator - PeerApprovalEnabled bool -} - -// Copy copies the ExtraSettings struct -func (e *ExtraSettings) Copy() *ExtraSettings { - return &ExtraSettings{ - PeerApprovalEnabled: e.PeerApprovalEnabled, - } -} - // Account represents a unique account of the system type Account struct { // we have to name column to aid as it collides with Network.Id when work with associations diff --git a/management/server/account/account.go b/management/server/account/account.go new file mode 100644 index 000000000..b8b71a6de --- /dev/null +++ b/management/server/account/account.go @@ -0,0 +1,13 @@ +package account + +type ExtraSettings struct { + // PeerApprovalEnabled enables or disables the need for peers bo be approved by an administrator + PeerApprovalEnabled bool +} + +// Copy copies the ExtraSettings struct +func (e *ExtraSettings) Copy() *ExtraSettings { + return &ExtraSettings{ + PeerApprovalEnabled: e.PeerApprovalEnabled, + } +}