Closed bguyza closed 4 years ago
This may fix the UI issue, but this isn't an ideal fix.
If we default a value like this in the domain it means that it will always default to this value if omitted from the API request. In this particular case, it looks like we do already document this default behavior of basic
during a create or update of the application. So this change would not modify this claim in the doc or contract in the service code.
However, the more ideal way to fix this is in the prepare
method in the BaseFormAction
used by AddAction
. You'll see in this code path a bunch of code to set up default values during the form construction if the value is null
.
You'll also want to add a test for this use case. This can be done in the AddActionTest
and you can use the HTML asserter to assert a value is checked. I can point you at some examples if you can't find any.
Closing in favor of : https://github.com/FusionAuth/fusionauth-app/pull/8
Issue
https://github.com/FusionAuth/fusionauth-issues/issues/810
Bug Description
When creating a new Application, enabling self-service registration, the form shows fields for both types. This is because on an AddAction,
registrationConfiguration
is null.Solution
Default the type on an Application object to
basic