mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
The admin user doesn't have the inetorgperson objectclass so don't have a givenname attribute. The UI is currently hardcoded to require "first name" which renders the admin user uneditable via the UI.
This is a hack that will allow admin to be edited, assuming that one doesn't try to add a firstname field. 440548
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user