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
Fix *.smtp.useAuth
, quota.usage.smtp.useStartTLS
and *.smtp.enabledSecurityProtocols
settings definitions
#9031
base: main
Are you sure you want to change the base?
Fix *.smtp.useAuth
, quota.usage.smtp.useStartTLS
and *.smtp.enabledSecurityProtocols
settings definitions
#9031
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9031 +/- ##
============================================
- Coverage 15.28% 15.28% -0.01%
+ Complexity 11522 11521 -1
============================================
Files 5425 5425
Lines 474005 474016 +11
Branches 61507 61782 +275
============================================
+ Hits 72447 72448 +1
- Misses 393516 393524 +8
- Partials 8042 8044 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@bernardodemarco , I think your change makes total sense functionally. One technical concern though
As there is already a |
@DaanHoogland, thanks for your review! When I started developing this PR I had also considered converting the The settings expect a whitespace-separated list of predefined values. The As a consequence of this, the Another problem that I've identified is that the current settings' values would need to be normalized into a comma-separated list. Additionally, the source code would need to be reviewed and adjusted in order to interpret correctly the new structure of values. On top of that, I've identified that the |
Description
The global settings
*.smtp.useAuth
andquota.usage.smtp.useStartTLS
are of boolean type, but the UI provides a standard text input field to manipulate them and does not perform any input validation. This PR, therefore, adds the toggle component to be rendered to manipulate these configurations.Besides that, the global settings
*.smtp.enabledSecurityProtocols
expect a white-space separated list of predefined values, but the UI also provides a text input field without any proper validation. As a consequence of that, this PR also adds a new component that enables operators to select and deselect values that belong to a list of predefined values.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Available options to be selected -
*.smtp.enabledSecurityProtocols
Display of selected options -
*.smtp.enabledSecurityProtocols
How Has This Been Tested?
Tests of
*.smtp.useAuth
andquota.usage.smtp.useStartTLS
Query output:
I verified the source code and the values of these settings are retrieved through
BooleanUtils.toBoolean(String)
. It returnstrue
if the value istrue
,y
,t
,1
,on
oryes
(case-insensitive).Hence, I executed the SQL query that has been added to the update script. The query converts the values that are interpreted as
true
totrue
. Values that are not interpreted astrue
, such asfalse
and0
, are converted tofalse
.Normalization output:
value
was sent to the API astrue
. When the toggle was off, on the other hand, the parameter was sent asfalse
.Tests of
*.smtp.enabledSecurityProtocols
When the component is focused, all the available options are displayed to the operator.
After selecting the desired options and confirming the update, the
value
parameter is sent to the API as a white-space separated list with the selected values.If no option is selected,
value
is sent as an empty string (""
).