Skip to Content.
Sympa Menu

devel - [sympa-dev] Soap Function to change owner with update_admin_user strange behaviour

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: "Tsapline Sylvain" <address@concealed>
  • To: <address@concealed>
  • Subject: [sympa-dev] Soap Function to change owner with update_admin_user strange behaviour
  • Date: Mon, 21 Jan 2008 18:11:24 +0100

Hi
 
We partially succeed to implement a soap modifcation to allow owner update.
 
The call to the new soap function is successfull as well as the modification of the email owner.
 
Owner Email Modification appears in the database.
 
Problem is whenever the apache instance is restarted all the modifications are lost !
 
It seem to us to be a small bug :)
 
What would you recommend to make it work ?
 
Thanks in advance.
 
 
# diff sympasoap.pm sympasoap.pm.orig
678,740d677
< sub changeOwner {
<     my $class = shift;
<     my $listname  = shift;
<     my $newemail = shift;
<
<     my $sender = $ENV{'USER_EMAIL'};
<     my $robot = $ENV{'SYMPA_ROBOT'};
<     my $remote_application_name = $ENV{'remote_application_name'};
<
<     &Log::do_log('info', 'SOAP changeOwner(list = %s\@%s) from %s via proxy application %s', $listname,$robot,$sender,$remote_application_name);
<
<     unless ($sender) {
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('User not specified')
<           ->faultdetail('Use a trusted proxy or login first ');
<     }
<
<     my @resultSoap;
<
<     unless ($listname) {
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('Incorrect number of parameters')
<           ->faultdetail('Use : <list>');
<     }
<
<     unless ($newemail) {
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('Incorrect number of parameters')
<           ->faultdetail('Use : <list>');
<     }
<
<     &Log::do_log('debug', 'SOAP changeOwner(%s,%s)', $listname,$robot);
<
<     my $list = new List ($listname, $robot);
<     unless ($list) {
<       &Log::do_log('info', 'changeOwner
%s@%s from %s refused, unknown list', $listname,$robot,$sender);
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('unknown list')
<           ->faultdetail("unknown list $listname");
<     }
<    
<     # check authorization
<     my $jpi_val = $list->am_i('owner', $sender);
<     &Log::do_log('info', 'changeOwner owner =%s', $jpi_val);
<
<     unless (($list->am_i('owner', $sender)) || (&List::is_listmaster($sender))) {
<       &Log::do_log('info', 'changeOwner %s from %s not allowed',$listname,$sender);
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('Not allowed')
<           ->faultdetail("Not allowed");
<      }
<
<      if( !defined($list->    ($sender, 'owner', { 'email' => $newemail })) )
<      {
<         &Log::do_log('info','changeOwner: processing error !');
<       die SOAP::Fault->faultcode('Client')
<           ->faultstring('owner for list not changed.')
<           ->faultdetail("list $listname can't change owner");
<      }
<
<      return 1;
< }
<
 
# diff sympa.wsdl sympa.wsdl.orig
224,233d223
< <message name="changeOwnerRequest">
<       <part name="list" type="xsd:string"/>
<       <part name="email" type="xsd:string"/>
<       <part name="newemail" type="xsd:string"/>
< </message>
<
<
< <message name="changeOwnerResponse">
<       <part name="return" type="xsd:boolean"/>
< </message>
314,317d303
<       <operation name="chnageOwner">
<               <input message="tns:changeOwnerRequest" />
<               <output message="tns:changeOwnerResponse" />
<       </operation>
572,584d557
<       <operation name="changeOwner">
<               <soap:operation soapAction="urn:sympasoap#changeOwner"/>
<                       <input>
<                               <soap:body use="encoded"
<                                       namespace="urn:sympasoap"
<                                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<                       </input>
<                       <output>
<                               <soap:body use="encoded"
<                                       namespace="urn:sympasoap"
<                                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<                       </output>
<       </operation>
 

Sylvain Tsapline -----------------------------------
PROSODIE - Département Systèmes
PROSODIE - Direction des Architectures et des moyens techniques
e-mail : address@concealed
----------------------------------------------------
www.prosodie.com

 



Archive powered by MHonArc 2.6.19+.

Top of Page