summaryrefslogtreecommitdiffstats
path: root/ipa-server
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-04-02 21:15:49 -0400
committerRob Crittenden <rcritten@redhat.com>2008-04-02 21:15:49 -0400
commitc30a533de62aee7a9d69a2a95c319a184870f087 (patch)
tree9936a361e9d8f61e65087097689110d90c09208c /ipa-server
parentd567aa4441f99673dddf1e2deb753eb66cb8ddfb (diff)
downloadfreeipa-c30a533de62aee7a9d69a2a95c319a184870f087.tar.gz
freeipa-c30a533de62aee7a9d69a2a95c319a184870f087.tar.xz
freeipa-c30a533de62aee7a9d69a2a95c319a184870f087.zip
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
Diffstat (limited to 'ipa-server')
-rw-r--r--ipa-server/ipa-gui/ipagui/helpers/ipahelper.py10
-rw-r--r--ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py12
2 files changed, 13 insertions, 9 deletions
diff --git a/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py b/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py
index a33acc074..511e28daf 100644
--- a/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py
+++ b/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py
@@ -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
diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py b/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py
index 8663098f1..1db062b40 100644
--- a/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py
@@ -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'))