summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/idviews.py
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-10-10 10:35:30 +0200
committerMartin Kosek <mkosek@redhat.com>2014-10-17 14:28:13 +0200
commit49fde3b047e63a549774a3354138102608855d77 (patch)
tree3bdfa71fbd679b97d721c1476e6d18ef0a319be9 /ipalib/plugins/idviews.py
parentb69a8dad2ebd98516d36b1470fa27c0819b8a985 (diff)
downloadfreeipa-49fde3b047e63a549774a3354138102608855d77.tar.gz
freeipa-49fde3b047e63a549774a3354138102608855d77.tar.xz
freeipa-49fde3b047e63a549774a3354138102608855d77.zip
idviews: error out if appling Default Trust View on hosts
https://fedorahosted.org/freeipa/ticket/4615 Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipalib/plugins/idviews.py')
-rw-r--r--ipalib/plugins/idviews.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipalib/plugins/idviews.py b/ipalib/plugins/idviews.py
index 1ae1709a1..bfa8675fb 100644
--- a/ipalib/plugins/idviews.py
+++ b/ipalib/plugins/idviews.py
@@ -240,6 +240,12 @@ class baseidview_apply(LDAPQuery):
# the ipaAssignedIDView to None
view_dn = None
+ if view == 'Default Trust View':
+ raise errors.ValidationError(
+ name=_('ID View'),
+ error=_('Default Trust View cannot be applied on hosts')
+ )
+
completed = 0
succeeded = {'host': []}
failed = {