Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Deprecate AllowProfilesOutsideOrganization and fix passing of DomainData #349

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions pkg/organizations/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ type Organization struct {

// Whether Connections within the Organization allow profiles that are
// outside of the Organization's configured User Email Domains.
//
// Deprecated: If you need to allow sign-ins from any email domain, contact [email protected].
AllowProfilesOutsideOrganization bool `json:"allow_profiles_outside_organization"`

// The Organization's Domains.
Expand Down Expand Up @@ -148,6 +150,8 @@ type CreateOrganizationOpts struct {

// Whether Connections within the Organization allow profiles that are
// outside of the Organization's configured User Email Domains.
//
// Deprecated: If you need to allow sign-ins from any email domain, contact [email protected].
AllowProfilesOutsideOrganization bool `json:"allow_profiles_outside_organization"`

// Domains of the Organization.
Expand All @@ -172,6 +176,8 @@ type UpdateOrganizationOpts struct {

// Whether Connections within the Organization allow profiles that are
// outside of the Organization's configured User Email Domains.
//
// Deprecated: If you need to allow sign-ins from any email domain, contact [email protected].
AllowProfilesOutsideOrganization bool

// Domains of the Organization.
Expand Down Expand Up @@ -328,10 +334,15 @@ func (c *Client) UpdateOrganization(ctx context.Context, opts UpdateOrganization
AllowProfilesOutsideOrganization bool `json:"allow_profiles_outside_organization"`

// Domains of the Organization.
Domains []string `json:"domains"`
DomainData []OrganizationDomainData `json:"domain_data,omitempty"`

// Domains of the Organization.
//
// Deprecated: Use DomainData instead.
Domains []string `json:"domains,omitempty"`
}

update_opts := UpdateOrganizationChangeOpts{opts.Name, opts.AllowProfilesOutsideOrganization, opts.Domains}
update_opts := UpdateOrganizationChangeOpts{opts.Name, opts.AllowProfilesOutsideOrganization, opts.DomainData, opts.Domains}

data, err := c.JSONEncode(update_opts)
if err != nil {
Expand Down
Loading