From 4264fe78205431e8497776fae92b111955d0dd1c Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Fri, 28 Dec 2001 18:41:33 +0000 Subject: [PATCH] Return fault code 9 'Access denied' if no app access --- phpgwapi/inc/class.xmlrpc_server.inc.php | 12 +++++++++++- phpgwapi/inc/xml_functions.inc.php | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.xmlrpc_server.inc.php b/phpgwapi/inc/class.xmlrpc_server.inc.php index 985d358762..3995ca6ca5 100644 --- a/phpgwapi/inc/class.xmlrpc_server.inc.php +++ b/phpgwapi/inc/class.xmlrpc_server.inc.php @@ -318,9 +318,19 @@ /* This only happens if they have app access. If not, we will * return a fault below. */ - $listmeth = $tmp[0] . '.' . $service . '.' . 'list_methods'; + $listmeth = $class . '.' . $service . '.' . 'list_methods'; $dmap = ExecMethod($listmeth,'xmlrpc'); } + else + { + $r = CreateObject('phpgwapi.xmlrpcresp', + '', + $GLOBALS['xmlrpcerr']['no_access'], + $GLOBALS['xmlrpcstr']['no_access'] + ); + return $r; + } + $this->dmap = $dmap; /* _debug_array($this->dmap);exit; */ } diff --git a/phpgwapi/inc/xml_functions.inc.php b/phpgwapi/inc/xml_functions.inc.php index e4c36cbf48..78fd87b673 100644 --- a/phpgwapi/inc/xml_functions.inc.php +++ b/phpgwapi/inc/xml_functions.inc.php @@ -79,6 +79,8 @@ $GLOBALS['xmlrpcstr']['no_ssl'] = 'No SSL support compiled in.'; $GLOBALS['xmlrpcerr']['curl_fail'] = 8; $GLOBALS['xmlrpcstr']['curl_fail'] = 'CURL error'; + $GLOBALS['xmlrpcerr']['no_access'] = 9; + $GLOBALS['xmlrpcstr']['no_access'] = 'Access denied'; $GLOBALS['xmlrpc_defencoding'] = 'UTF-8';