mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
Enable the verbose flag to pass thru xmlrpc
This commit is contained in:
parent
42cdca3e83
commit
75bad44c27
@ -738,6 +738,8 @@ class Environment(object):
|
||||
continue
|
||||
self[key] = value
|
||||
|
||||
def get(self, name, default=None):
|
||||
return self.__map.get(name, default)
|
||||
|
||||
class API(DictProxy):
|
||||
"""
|
||||
|
@ -36,15 +36,15 @@ class xmlrpc(Backend):
|
||||
Kerberos backend plugin.
|
||||
"""
|
||||
|
||||
def get_client(self):
|
||||
def get_client(self, verbose=False):
|
||||
# FIXME: The server uri should come from self.api.env.server_uri
|
||||
return xmlrpclib.ServerProxy('http://localhost:8888', allow_none=True)
|
||||
return xmlrpclib.ServerProxy('http://localhost:8888', verbose=verbose)
|
||||
|
||||
def forward_call(self, name, *args, **kw):
|
||||
"""
|
||||
Forward a call over XML-RPC to an IPA server.
|
||||
"""
|
||||
client = self.get_client()
|
||||
client = self.get_client(verbose=api.env.get('verbose', False))
|
||||
command = getattr(client, name)
|
||||
params = xmlrpc_marshal(*args, **kw)
|
||||
try:
|
||||
|
@ -231,6 +231,8 @@ class user_find(crud.Find):
|
||||
return result
|
||||
def forward(self, *args, **kw):
|
||||
users = super(crud.Find, self).forward(*args, **kw)
|
||||
if not users:
|
||||
return
|
||||
counter = users[0]
|
||||
users = users[1:]
|
||||
if counter == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user