Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
fix typo on Connection options attribute
Browse files Browse the repository at this point in the history
EnableDatabaseCustomization -> EnabledDatabaseCustomization
  • Loading branch information
Laurent DUTHEIL committed Jul 27, 2018
1 parent cffaac2 commit 1f31a1b
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 227 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 35 additions & 35 deletions auth0/resource_auth0_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func newConnection() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"enable_database_customization": {
"enabled_database_customization": {
Type: schema.TypeBool,
Optional: true,
},
Expand Down Expand Up @@ -162,23 +162,23 @@ func readConnection(d *schema.ResourceData, m interface{}) error {
d.Set("strategy", c.Strategy)
d.Set("options", []map[string]interface{}{
{
"validation": c.Options.Validation,
"password_policy": c.Options.PasswordPolicy,
"password_history": c.Options.PasswordHistory,
"password_no_personal_info": c.Options.PasswordNoPersonalInfo,
"password_dictionary": c.Options.PasswordDictionary,
"api_enable_users": c.Options.APIEnableUsers,
"basic_profile": c.Options.BasicProfile,
"ext_admin": c.Options.ExtAdmin,
"ext_is_suspended": c.Options.ExtIsSuspended,
"ext_agreed_terms": c.Options.ExtAgreedTerms,
"ext_groups": c.Options.ExtGroups,
"ext_assigned_plans": c.Options.ExtAssignedPlans,
"ext_profile": c.Options.ExtProfile,
"enable_database_customization": c.Options.EnableDatabaseCustomization,
"brute_force_protection": c.Options.BruteForceProtection,
"import_mode": c.Options.ImportMode,
"disable_signup": c.Options.DisableSignup,
"validation": c.Options.Validation,
"password_policy": c.Options.PasswordPolicy,
"password_history": c.Options.PasswordHistory,
"password_no_personal_info": c.Options.PasswordNoPersonalInfo,
"password_dictionary": c.Options.PasswordDictionary,
"api_enable_users": c.Options.APIEnableUsers,
"basic_profile": c.Options.BasicProfile,
"ext_admin": c.Options.ExtAdmin,
"ext_is_suspended": c.Options.ExtIsSuspended,
"ext_agreed_terms": c.Options.ExtAgreedTerms,
"ext_groups": c.Options.ExtGroups,
"ext_assigned_plans": c.Options.ExtAssignedPlans,
"ext_profile": c.Options.ExtProfile,
"enabled_database_customization": c.Options.EnabledDatabaseCustomization,
"brute_force_protection": c.Options.BruteForceProtection,
"import_mode": c.Options.ImportMode,
"disable_signup": c.Options.DisableSignup,
},
})
d.Set("enabled_clients", c.EnabledClients)
Expand Down Expand Up @@ -217,23 +217,23 @@ func buildConnection(d *schema.ResourceData) *management.Connection {
options := v.(map[string]interface{})

c.Options = &management.ConnectionOptions{
Validation: options["validation"].(map[string]interface{}),
PasswordPolicy: options["password_policy"].(string),
PasswordHistory: options["password_history"].(map[string]interface{}),
PasswordNoPersonalInfo: options["password_no_personal_info"].(map[string]interface{}),
PasswordDictionary: options["password_dictionary"].(map[string]interface{}),
APIEnableUsers: options["api_enable_users"].(bool),
BasicProfile: options["basic_profile"].(bool),
ExtAdmin: options["ext_admin"].(bool),
ExtIsSuspended: options["ext_is_suspended"].(bool),
ExtAgreedTerms: options["ext_agreed_terms"].(bool),
ExtGroups: options["ext_groups"].(bool),
ExtAssignedPlans: options["ext_assigned_plans"].(bool),
ExtProfile: options["ext_profile"].(bool),
EnableDatabaseCustomization: options["enable_database_customization"].(bool),
BruteForceProtection: options["brute_force_protection"].(bool),
ImportMode: options["import_mode"].(bool),
DisableSignup: options["disable_signup"].(bool),
Validation: options["validation"].(map[string]interface{}),
PasswordPolicy: options["password_policy"].(string),
PasswordHistory: options["password_history"].(map[string]interface{}),
PasswordNoPersonalInfo: options["password_no_personal_info"].(map[string]interface{}),
PasswordDictionary: options["password_dictionary"].(map[string]interface{}),
APIEnableUsers: options["api_enable_users"].(bool),
BasicProfile: options["basic_profile"].(bool),
ExtAdmin: options["ext_admin"].(bool),
ExtIsSuspended: options["ext_is_suspended"].(bool),
ExtAgreedTerms: options["ext_agreed_terms"].(bool),
ExtGroups: options["ext_groups"].(bool),
ExtAssignedPlans: options["ext_assigned_plans"].(bool),
ExtProfile: options["ext_profile"].(bool),
EnabledDatabaseCustomization: options["enabled_database_customization"].(bool),
BruteForceProtection: options["brute_force_protection"].(bool),
ImportMode: options["import_mode"].(bool),
DisableSignup: options["disable_signup"].(bool),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions auth0/resource_auth0_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestAccConnection(t *testing.T) {
resource.TestCheckResourceAttr("auth0_connection.my_connection", "name", "Acceptance-Test-Connection"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "strategy", "auth0"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.password_policy", "fair"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.enable_database_customization", "false"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.enabled_database_customization", "false"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.brute_force_protection", "true"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.import_mode", "true"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.disable_signup", "true"),
Expand All @@ -38,7 +38,7 @@ resource "auth0_connection" "my_connection" {
strategy = "auth0"
options = {
password_policy = "fair"
enable_database_customization = false
enabled_database_customization = false
brute_force_protection = true
import_mode = true
disable_signup = true
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/yieldr/go-auth0/management/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions vendor/github.com/yieldr/go-auth0/management/connection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/yieldr/go-auth0/management/email.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f31a1b

Please sign in to comment.