diff --git a/pkg/accessreview/drivers/scaleway.go b/pkg/accessreview/drivers/scaleway.go index 120ba69dd..2d94df465 100644 --- a/pkg/accessreview/drivers/scaleway.go +++ b/pkg/accessreview/drivers/scaleway.go @@ -98,7 +98,7 @@ func (d *ScalewayDriver) ListAccounts(ctx context.Context) ([]AccountRecord, err FullName: scalewayFullName(u, email), Roles: scalewayRoles(u.Type), Active: scalewayActive(u.Status, u.Locked), - IsAdmin: strings.EqualFold(strings.TrimSpace(u.Type), "owner"), + IsAdmin: scalewayIsAdmin(u.Type), MFAStatus: scalewayMFAStatus(u), AuthMethod: coredata.AccessReviewEntryAuthMethodUnknown, AccountType: coredata.AccessReviewEntryAccountTypeUser, @@ -194,6 +194,12 @@ func scalewayRoles(userType string) []string { } } +// scalewayIsAdmin reports whether a Scaleway user type grants administrative +// access. Only the organization owner is an administrator; members are not. +func scalewayIsAdmin(userType string) bool { + return strings.EqualFold(strings.TrimSpace(userType), "owner") +} + // scalewayActive maps the Scaleway user status to the three-valued Active // signal. A locked account is always inactive; otherwise only the documented // "activated"/"invitation_pending" values are an explicit signal and any other