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
WebUI: don't change casing of Auth Indicators values #331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nack - regression in labels
ipaserver/plugins/internal.py
Outdated
| "type_otp": _("Two factor authentication (password + OTP)"), | ||
| "type_password": _("Password"), | ||
| "type_radius": _("RADIUS"), | ||
| "type_radius": _("radius"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this shows then invalid lowercase value on IPA Server/Configuration page for auth types and also on user details page.
It would be better to create separate:
authindicator_otp: _("otp"),
authindicator_radius _("radius"),
And use those for auth indicators checkboxes to avoid such side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe even better, auth indicators should not use translated labels. So labels should be the same value as value and they can be hardcoded.
install/ui/src/freeipa/widget.js
Outdated
| @@ -2509,6 +2509,9 @@ IPA.custom_checkboxes_widget = function(spec) { | |||
|
|
|||
| var that = IPA.checkboxes_widget(spec); | |||
|
|
|||
| that.set_value_to_lowercase = spec.set_value_to_lowercase === undefined | |||
| ? true : spec.set_value_to_lowercase; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better if the default behavior was 'no lower casing' -> change to false and then adjust usages of the widget.
Reasoning: no formatting seems more nutural
|
LGTM (reading code). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aci.attributes_widget needs to have set_value_to_lowercase True
| @@ -2509,6 +2509,8 @@ IPA.custom_checkboxes_widget = function(spec) { | |||
|
|
|||
| var that = IPA.checkboxes_widget(spec); | |||
|
|
|||
| that.set_value_to_lowercase = spec.set_value_to_lowercase || false; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the default is changed, it needs to be changed also in the other widget where it was used: aci.attributes_widget
Without it, following command will break Web UI: ipa permission-mod AA_foo --attrs=businessCategory
Add new attribute which keeps information whether each text added using custom_checkbox_widget shoud be transformed to lowercase. Part of: https://fedorahosted.org/freeipa/ticket/6308
All values were previously converted to lowercase which was not coresponding with CLI behaviour. Now they stay as they are inserted. I also have to change the strings to lowercase because the otp and radius should be inserted as lowercase words. https://fedorahosted.org/freeipa/ticket/6308
|
ACK but I've find out that the change is not enough because of existing bug. See pr #554 |
All values were previously converted to lowercase which was not
coresponding with CLI behaviour. Now they stay as they are
inserted. I also have to change the strings to lowercase because
the otp and radius should be inserted as lowercase words.
https://fedorahosted.org/freeipa/ticket/6308