mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-17 20:29:07 +02:00
* Implement OwnsProfile on Server * (WIP) List profiles based on ownership by Identity * (WIP) Migrate active_profile * Fix status and list profiles * Add profile stamping as active migration * Add one-shot migration * Only default profile fail open * Use restricted write for config json * Fix stale server config after stamp * Fix OwnsProfile fallback to active profile * Fix config concurrent reload during OwnsProfile check * Move known check to inside stamp owner * Update client/internal/profilemanager/service.go Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Recover from dup active profiles that cannot be resolved with username. * Add test for already owned profile during migration * Improve stamping of fields in the config * Apply suggestion from @cubic-dev-ai[bot] Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Fix codespell and test comment --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
15 lines
483 B
Go
15 lines
483 B
Go
package profilemanager
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
ErrProfileNotFound = errors.New("profile not found")
|
|
ErrProfileAlreadyExists = errors.New("profile already exists")
|
|
ErrNoActiveProfile = errors.New("no active profile set")
|
|
|
|
// ErrAmbiguousActiveProfile is returned when the active profile state names
|
|
// an ID that several profiles hold and does not say whose directory the
|
|
// active one sits in.
|
|
ErrAmbiguousActiveProfile = errors.New("active profile is ambiguous")
|
|
)
|