From e1dde21ec36b36d6519c52e7e04131818e76a095 Mon Sep 17 00:00:00 2001 From: Jijo Varghese Date: Fri, 29 Jun 2018 23:36:57 -0700 Subject: [PATCH 1/2] ldap attributes filter in user_groups() ldap search currently fetches ALL attributes which is a waste of bandwidth resources and woefully slow on large ldap groups when it only needs to parse the name_attr Signed-off-by: Jijo Varghese --- awx/sso/ldap_group_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/sso/ldap_group_types.py b/awx/sso/ldap_group_types.py index 84144e0af3..b155ab99c8 100644 --- a/awx/sso/ldap_group_types.py +++ b/awx/sso/ldap_group_types.py @@ -42,6 +42,7 @@ class PosixUIDGroupType(LDAPGroupType): ) search = group_search.search_with_additional_term_string(filterstr) + search.attrlist = [self.name_attr] groups = search.execute(ldap_user.connection) except (KeyError, IndexError): pass @@ -72,4 +73,3 @@ class PosixUIDGroupType(LDAPGroupType): is_member = False return is_member - From 8754ab80c7c5eb5852ca87e943a6a2e671af6fa0 Mon Sep 17 00:00:00 2001 From: Arnout van Meer Date: Wed, 11 Jul 2018 14:09:34 +0100 Subject: [PATCH 2/2] Don't capitalise last name Making assumptions about names is always a risky situation, even having a separate first and last name field should be avoided wherever possible. In this specific case, applying auto-capitalisation to the first character of the last name field makes it impossible to correctly enter my (and many other) Dutch surname. Common initial parts of Dutch surnames are 'de', 'van', 'van der' and other combinations. These are always lowercase. Fun additional trivia: when it comes to sorting these names alphabetically you are supposed to ignore the prefix. In the case of my name you'd index it under 'M', not 'v'. --- awx/ui/client/src/users/users.form.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/ui/client/src/users/users.form.js b/awx/ui/client/src/users/users.form.js index 0ffc63151b..0479eb91a2 100644 --- a/awx/ui/client/src/users/users.form.js +++ b/awx/ui/client/src/users/users.form.js @@ -36,8 +36,7 @@ export default ['i18n', function(i18n) { label: i18n._('Last Name'), type: 'text', ngDisabled: '!(user_obj.summary_fields.user_capabilities.edit || canAdd)', - required: true, - capitalize: true + required: true }, organization: { label: i18n._('Organization'),