mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
extract account into separate package
This commit is contained in:
parent
a729c83b06
commit
bab420ca77
@ -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
|
||||
|
13
management/server/account/account.go
Normal file
13
management/server/account/account.go
Normal file
@ -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,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user