feat(auth): add Owner authentication source settings

Manage Yggdrasil providers from the panel using durable platform settings, protected identity namespaces and atomic revisions. Apply changes to subsequent logins and profile lookups without restarting. Return operator-host logouts to the login method selection page.
This commit is contained in:
Lemon-miaow committed 2026-10-04 22:18:37 +08:00
1 parent 2c98e8b2ab
commit 61b283ae2f
33 files changed
+1466 -18

No files matched your search

+8
View File
@@ -1231,6 +1231,14 @@ func (f *fakeRepo) SetSetting(_ context.Context, key string, value []byte) error
return nil
}
func (f *fakeRepo) CompareAndSetSetting(ctx context.Context, key string, expected, value []byte) error {
current, exists := f.settings[key]
if (expected == nil && exists) || (expected != nil && (!exists || string(current) != string(expected))) {
return ErrConflict
}
return f.SetSetting(ctx, key, value)
}
// ---- user admin fakes ----
// seededUser is a test-only user row held in the fake repo.