diff options
Diffstat (limited to 'ipa-server')
-rw-r--r-- | ipa-server/ipa-gui/ipagui/subcontrollers/user.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py index 0a79fc794..9232f305e 100644 --- a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py +++ b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py @@ -413,6 +413,16 @@ class UserController(IPAController): # later the update will not be processed cherrypy.session['uid'] = user_dict.get('uid') + # Hack. The admin user doesn't have inetorgperson as an + # objectclass so don't require the givenName attribute if + # this objectclass doesn't exist in the record. + oc = [x.lower() for x in user_dict.get('objectclass')] + try: + p = oc.index('inetorgperson') + except ValueError: + # This entry doesn't have inetorgperson so don't require gn + user_edit_form.validator.fields.get('givenname').not_empty=False + return dict(form=user_edit_form, user=user_dict, user_groups=user_groups_dicts) except ipaerror.IPAError, e: |