From 3e10a00a5c90436c75955488acd86eabde62997b Mon Sep 17 00:00:00 2001 From: Brandon Romano Date: Mon, 18 Nov 2024 15:21:28 -0800 Subject: [PATCH] Set CreateOrganizationsLimit as an int32 (#357) This value is stored as an int32 in its underlying datastore, so we want this to be restricted to an int32 so an overflow can be caught in request validation. --- user.go | 2 +- user/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user.go b/user.go index 3d05c98..66ef696 100644 --- a/user.go +++ b/user.go @@ -35,7 +35,7 @@ type User struct { VerificationAttemptsRemaining *int64 `json:"verification_attempts_remaining"` DeleteSelfEnabled bool `json:"delete_self_enabled"` CreateOrganizationEnabled bool `json:"create_organization_enabled"` - CreateOrganizationsLimit *int `json:"create_organizations_limit,omitempty"` + CreateOrganizationsLimit *int32 `json:"create_organizations_limit,omitempty"` LastActiveAt *int64 `json:"last_active_at"` LegalAcceptedAt *int64 `json:"legal_accepted_at"` CreatedAt int64 `json:"created_at"` diff --git a/user/client.go b/user/client.go index 1ba0b6c..5e01d68 100644 --- a/user/client.go +++ b/user/client.go @@ -101,7 +101,7 @@ type UpdateParams struct { BackupCodes *[]string `json:"backup_codes,omitempty"` DeleteSelfEnabled *bool `json:"delete_self_enabled,omitempty"` CreateOrganizationEnabled *bool `json:"create_organization_enabled,omitempty"` - CreateOrganizationsLimit *int `json:"create_organizations_limit,omitempty"` + CreateOrganizationsLimit *int32 `json:"create_organizations_limit,omitempty"` // Specified in RFC3339 format LegalAcceptedAt *string `json:"legal_accepted_at,omitempty"` SkipLegalChecks *bool `json:"skip_legal_checks,omitempty"`