feat(auth): add superadmin support for OAuth clients
CI / build-and-test (push) Successful in 2m46s

* Introduce Superadmin field in OAuthClient configuration
* Implement IsSuperadmin method in OAuthRegistry
* Update identityAdmin to check superadmin status via OAuthRegistry
* Add tests for OAuthRegistry superadmin functionality
This commit is contained in:
2026-07-20 23:19:51 +02:00
parent 196b543bee
commit d7c0205c50
6 changed files with 52 additions and 7 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ func routes(logger *slog.Logger, cfg *config.Config, info buildinfo.Info, db *st
enrichmentRetryer := tools.NewEnrichmentRetryer(context.Background(), db, bgMetadata, cfg.Capture, cfg.AI.Metadata.Timeout, activeProjects, logger)
backfillTool := tools.NewBackfillTool(db, bgEmbeddings, activeProjects, logger)
adminActions := newAdminActions(backfillTool, enrichmentRetryer, logger)
identityAdmin := newIdentityAdmin(db.Pool(), keyring, logger)
identityAdmin := newIdentityAdmin(db.Pool(), keyring, oauthRegistry, logger)
toolSet := mcpserver.ToolSet{
Capture: tools.NewCaptureTool(db, embeddings, cfg.Capture, activeProjects, enrichmentRetryer, backfillTool),