mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-07 14:53:01 -06:00
Don't try to update ipauserobjectclasses or ipagroupobjectclasses
since they aren't being displayed anymore. They will just get blanked. Also add some error handling in ipahelper.fix_incoming_fields() 438256
This commit is contained in:
parent
d567aa4441
commit
c30a533de6
@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
import re
|
||||
import logging
|
||||
|
||||
def javascript_string_escape(input):
|
||||
"""Escapes the ' " and \ characters in a string so
|
||||
@ -50,8 +51,11 @@ def fix_incoming_fields(fields, fieldname, multifieldname):
|
||||
field, then removes the multiple field.
|
||||
"""
|
||||
fields[fieldname] = []
|
||||
for i in range(len(fields[multifieldname])):
|
||||
fields[fieldname].append(fields[multifieldname][i][fieldname])
|
||||
del(fields[multifieldname])
|
||||
try:
|
||||
for i in range(len(fields[multifieldname])):
|
||||
fields[fieldname].append(fields[multifieldname][i][fieldname])
|
||||
del(fields[multifieldname])
|
||||
except Exception, e:
|
||||
logging.warn("fix_incoming_fields error: " + str(e))
|
||||
|
||||
return fields
|
||||
|
@ -163,12 +163,12 @@ class IPAPolicyController(IPAController):
|
||||
if new_ipapolicy.getValues('ipadefaultprimarygroup') != kw.get('ipadefaultprimarygroup'):
|
||||
policy_modified = True
|
||||
new_ipapolicy.setValue('ipadefaultprimarygroup', kw.get('ipadefaultprimarygroup'))
|
||||
if new_ipapolicy.getValues('ipauserobjectclasses') != kw.get('ipauserobjectclasses'):
|
||||
policy_modified = True
|
||||
new_ipapolicy.setValue('ipauserobjectclasses', kw.get('ipauserobjectclasses'))
|
||||
if new_ipapolicy.getValues('ipagroupobjectclasses') != kw.get('ipagroupobjectclasses'):
|
||||
policy_modified = True
|
||||
new_ipapolicy.setValue('ipagroupobjectclasses', kw.get('ipagroupobjectclasses'))
|
||||
# if new_ipapolicy.getValues('ipauserobjectclasses') != kw.get('ipauserobjectclasses'):
|
||||
# policy_modified = True
|
||||
# new_ipapolicy.setValue('ipauserobjectclasses', kw.get('ipauserobjectclasses'))
|
||||
# if new_ipapolicy.getValues('ipagroupobjectclasses') != kw.get('ipagroupobjectclasses'):
|
||||
# policy_modified = True
|
||||
# new_ipapolicy.setValue('ipagroupobjectclasses', kw.get('ipagroupobjectclasses'))
|
||||
if new_ipapolicy.getValues('ipadefaultemaildomain') != kw.get('ipadefaultemaildomain'):
|
||||
policy_modified = True
|
||||
new_ipapolicy.setValue('ipadefaultemaildomain', kw.get('ipadefaultemaildomain'))
|
||||
|
Loading…
Reference in New Issue
Block a user