summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/config.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-02-25 19:02:04 -0500
committerMartin Kosek <mkosek@redhat.com>2012-02-27 10:06:35 +0100
commitac47b1ca6e902d52e9791f427d3b6f193cbb56b6 (patch)
tree65f7acca3fd205b11eeba8b87ba083093fc7e0e6 /ipalib/plugins/config.py
parent16d88d79ad251e353059d18a4020a96e52ee9363 (diff)
downloadfreeipa.git-ac47b1ca6e902d52e9791f427d3b6f193cbb56b6.tar.gz
freeipa.git-ac47b1ca6e902d52e9791f427d3b6f193cbb56b6.tar.xz
freeipa.git-ac47b1ca6e902d52e9791f427d3b6f193cbb56b6.zip
Don't consider virtual attributes when validating custom objectclasses
We verify user and group default objectclasses when changing them to be sure that required objectclasses aren't being dropped. We need to ignore virtual attributes or it will raise an error because they aren't defined in schema. https://fedorahosted.org/freeipa/ticket/2406
Diffstat (limited to 'ipalib/plugins/config.py')
-rw-r--r--ipalib/plugins/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py
index ecf42464..c4615e3d 100644
--- a/ipalib/plugins/config.py
+++ b/ipalib/plugins/config.py
@@ -239,6 +239,11 @@ class config_mod(LDAPUpdate):
for obj_attr in checked_attrs:
if obj_attr in OPERATIONAL_ATTRIBUTES:
continue
+ if obj_attr in self.api.Object[obj].params and \
+ 'virtual_attribute' in \
+ self.api.Object[obj].params[obj_attr].flags:
+ # skip virtual attributes
+ continue
if obj_attr not in new_allowed_attrs:
raise errors.ValidationError(name=attr,
error=_('%(obj)s default attribute %(attr)s would not be allowed!') \