Move Vercel /v2/user fetch to pkg/connector/vercel.go → Migrate connector settings callers to generic

- Move Vercel /v2/user fetch to pkg/connector/vercel.go
- Authorize NeedsConfiguration and SelectedOrganization
- Add coredata.ConnectorSettings[T] generic helper
- Migrate connector settings callers to generic

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-05-17 17:22:49 +02:00
parent caec9f1ad5
commit 8917b46541
8 changed files with 154 additions and 72 deletions

View File

@@ -469,6 +469,10 @@ func (r *accessSourceResolver) ProviderOrganizations(ctx context.Context, obj *t
// NeedsConfiguration is the resolver for the needsConfiguration field.
func (r *accessSourceResolver) NeedsConfiguration(ctx context.Context, obj *types.AccessSource) (bool, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionAccessSourceGet); err != nil {
return false, err
}
if obj.ConnectorID == nil {
return false, nil
}
@@ -560,6 +564,10 @@ func (r *accessSourceResolver) ConnectionStatus(ctx context.Context, obj *types.
// SelectedOrganization is the resolver for the selectedOrganization field.
func (r *accessSourceResolver) SelectedOrganization(ctx context.Context, obj *types.AccessSource) (*string, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionAccessSourceGet); err != nil {
return nil, err
}
if obj.ConnectorID == nil {
return nil, nil
}