mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-24 19:51:33 +02: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"
|
"github.com/netbirdio/netbird/base62"
|
||||||
nbdns "github.com/netbirdio/netbird/dns"
|
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/activity"
|
||||||
"github.com/netbirdio/netbird/management/server/idp"
|
"github.com/netbirdio/netbird/management/server/idp"
|
||||||
"github.com/netbirdio/netbird/management/server/jwtclaims"
|
"github.com/netbirdio/netbird/management/server/jwtclaims"
|
||||||
@ -162,7 +163,7 @@ type Settings struct {
|
|||||||
JWTGroupsClaimName string
|
JWTGroupsClaimName string
|
||||||
|
|
||||||
// Extra is a dictionary of Account settings
|
// Extra is a dictionary of Account settings
|
||||||
Extra *ExtraSettings
|
Extra *account.ExtraSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy copies the Settings struct
|
// Copy copies the Settings struct
|
||||||
@ -180,18 +181,6 @@ func (s *Settings) Copy() *Settings {
|
|||||||
return 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
|
// Account represents a unique account of the system
|
||||||
type Account struct {
|
type Account struct {
|
||||||
// we have to name column to aid as it collides with Network.Id when work with associations
|
// 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…
x
Reference in New Issue
Block a user