On 29.6.2016 10:21, Jan Cholasta wrote:
On 29.6.2016 09:22, David Kupka wrote:
On 28/04/16 14:45, Jan Cholasta wrote:
Hi,

I have pushed my thin client WIP branch to GitHub:
<https://github.com/jcholast/freeipa/tree/trac-4739>.

All commits up to "ipalib: use relative imports for cross-plugin
imports" should be good for review. The rest is subject to change
(WARNING: I will force push into this branch).

Honza


Hello!

Commit "schema: fix Flag arguments on the client" fixes regression
reported in https://fedorahosted.org/freeipa/ticket/6009, ACK.

Thanks, pushed to master: a77e21cbca05be422fe5826857cfba7e0ba6e71f

Attaching the patch for reference.

Martin found a regression caused by this patch. The attached patch should fix it.

--
Jan Cholasta
From 61028180135f1f5967778fba6ecabd28f8b2da7d Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 30 Jun 2016 10:27:05 +0200
Subject: [PATCH] schema: properly fix Flag arguments on the client

The previous fix in commit a77e21cbca05be422fe5826857cfba7e0ba6e71f made
some Bool arguments appear as Flag on the client. This change fixes that.

https://fedorahosted.org/freeipa/ticket/6009
---
 ipaclient/remote_plugins/schema.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
index 7d5c8d0..08ed2b7 100644
--- a/ipaclient/remote_plugins/schema.py
+++ b/ipaclient/remote_plugins/schema.py
@@ -219,8 +219,8 @@ class _SchemaPlugin(object):
             cls = Password
             sensitive = False
         elif (type_name == 'bool' and
-                'default' in schema and
-                schema['default'][0] == u'False'):
+                'default' in schema and schema['default'][0] == u'False' and
+                schema.get('alwaysask', u'False') == u'False'):
             cls = Flag
             del schema['default']
         else:
-- 
2.7.4

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to