From 734cf9998d034ae62e89ade2fc635519a98e0858 Mon Sep 17 00:00:00 2001
From: Martin Haase <martin.haase@daasi.de>
Date: Fri, 22 Oct 2010 12:51:39 +0000
Subject: [PATCH] removed experimental provideUserDetails() succeeded by
 setMyUserAttributes()

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@7519 7c539038-3410-0410-b1ec-0f2a7bf1c452
---
 .../rbacSoap/TgExtra.class.php                | 58 -------------------
 .../rbacSoap/wsdl-8081/tgextra.wsdl           | 49 ----------------
 2 files changed, 107 deletions(-)

diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php
index 3194c1d..182eeb6 100755
--- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php
+++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php
@@ -1560,64 +1560,6 @@ class TgExtra {
     return $result;
   }
 
-
-  // -----------------------------------------------------
-  // Function: provideUserDetails
-  // Input: auth / xsd:string
-  //        log / xsd:string
-  //        citizenship / xsd:string / mandatory
-  //        personid / xsd:string /optional
-  //        interest / xsd:string /optional
-  //        organisationalunit / xsd:string /optional
-  // Output: result / xsd:boolean
-  // Description
-  //   Sets further details, called from the Lab
-  // -----------------------------------------------------
-  public function provideUserDetails ( $inRequest ) {
-
-    $arrModify = Array();
-    $filter = "";
-    $result = new booleanResponse();  // The return-result
-
-    $ePPN = $this->rbac->sessionUser( $inRequest->auth );
-
-    $filter = "(" . $this->config->getValue( "authentication", "namingattribute" ) . "=" . $ePPN . ")";
-
-    $arrUserEntry = $this->connection['user']->search( $this->config->getValue( "authentication", "base" ), $filter, "sub" );
-
-    if( sizeof( $arrUserEntry ) == 1 && isset( $arrUserEntry[0]) &&  isset( $arrUserEntry[0]['dn']) ) {
-
-      $entry = $arrUserEntry[0];
-
-      if (!in_array ("schacPersonalCharacteristics", $entry['objectclass'])) {
-        $arrModify['objectclass'][] = "schacPersonalCharacteristics";
-        ldap_mod_add ($this->connection['user']->getConnection(), $entry['dn'], $arrModify);
-        unset ( $arrModify );
-      }
-      if (!in_array ("TextGridUser", $entry['objectclass'])) {
-        $arrModify['objectclass'][] = "TextGridUser";
-        ldap_mod_add ($this->connection['user']->getConnection(), $entry['dn'], $arrModify);
-        unset ( $arrModify );
-      }
-
-      if ( strlen($inRequest->citizenship) > 0 ) { $arrModify['schacCountryOfCitizenship'][] = $inRequest->citizenship; }
-      if ( strlen($inRequest->organisationalunit) > 0 ) { $arrModify['ou'][] = $inRequest->organisationalunit; }
-      if ( strlen($inRequest->interest) > 0 ) { $arrModify['TGfieldOfInterest'][] = $inRequest->interest; }
-      if ( strlen($inRequest->personid) > 0 ) { $arrModify['TGidentifierForPerson'][] = $inRequest->personid; }
-
-      $this->connection['user']->modify( $entry['dn'], $arrModify);
-
-      $result->result = true;
-
-    } else {
-      // no unique user found
-      	$result->result = false;
-    }
-
-    return $result;
-  }
-
-
   // -----------------------------------------------------
   // Function: setProjectFile
   // Input: auth / xsd:string
diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/wsdl-8081/tgextra.wsdl b/info.textgrid.middleware.tgauth.rbac/rbacSoap/wsdl-8081/tgextra.wsdl
index 94b7f12..7fba7b3 100644
--- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/wsdl-8081/tgextra.wsdl
+++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/wsdl-8081/tgextra.wsdl
@@ -421,19 +421,6 @@
           </xsd:sequence>
         </xsd:complexType>
       </xsd:element>
-<!-- #### provideUserDetails #### //-->
-      <xsd:element name="provideUserDetailsRequest">
-        <xsd:complexType>
-          <xsd:sequence>
-            <xsd:element name="auth" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="log" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-            <xsd:element name="citizenship" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="personid" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-            <xsd:element name="interest" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-            <xsd:element name="organisationalunit" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-          </xsd:sequence>
-        </xsd:complexType>
-      </xsd:element>
 <!-- #### getNames #### //-->
       <xsd:element name="getNamesRequest">
         <xsd:complexType>
@@ -861,13 +848,6 @@
   <wsdl:message name="setNameResponse">
     <wsdl:part element="tns:booleanResponse" name="setNameOutput"/>
   </wsdl:message>
-<!-- #### provideUserDetails #### //-->
-  <wsdl:message name="provideUserDetailsRequest">
-    <wsdl:part element="tns:provideUserDetailsRequest" name="provideUserDetailsInput"/>
-  </wsdl:message>
-  <wsdl:message name="provideUserDetailsResponse">
-    <wsdl:part element="tns:booleanResponse" name="provideUserDetailsOutput"/>
-  </wsdl:message>
 <!-- #### getNames #### //-->
   <wsdl:message name="getNamesRequest">
     <wsdl:part element="tns:getNamesRequest" name="getNamesInput"/>
@@ -1067,25 +1047,6 @@
       <wsdl:input message="tns:setNameRequest"/>
       <wsdl:output message="tns:setNameResponse"/>
     </wsdl:operation>
-<!-- #### provideUserDetails #### //-->
-    <wsdl:operation name="provideUserDetails">
-      <wsdl:documentation>
-				Supply further user-specific information
-				<ul><li><b>Input Parameters</b>
-						provideUserDetailsRequest, with elements
-						<ul><li>auth - String, SessionID of User who wants to set their name</li><li>log - String for log information, optional</li><li>citizenship - mandatory 2-letter String with code for Country
-								Of Citizenship of the User</li><li>personid - optional, an URI or PND reference for the person</li><li>interest - optional, Users can list their TextGrid-related
-								research interests</li><li>organisationalunit - optional, finer-grained unit of a larger
-								organisation</li></ul></li><li><b>Output Parameters</b>
-						booleanResponse, with element
-						<ul><li>result - boolean, true if operation was successful,
-								false
-								otherwise</li></ul></li><li><b>Faults</b><ul>
-						</ul></li></ul>
-			</wsdl:documentation>
-      <wsdl:input message="tns:provideUserDetailsRequest"/>
-      <wsdl:output message="tns:provideUserDetailsResponse"/>
-    </wsdl:operation>
 <!-- #### getNames #### //-->
     <wsdl:operation name="getNames">
       <wsdl:documentation>
@@ -1921,16 +1882,6 @@
         <soap:body use="literal"/>
       </wsdl:output>
     </wsdl:operation>
-<!-- #### provideUserDetails #### //-->
-    <wsdl:operation name="provideUserDetails">
-      <soap:operation soapAction="http://textgrid.info/namespaces/middleware/tgauth/provideUserDetails"/>
-      <wsdl:input>
-        <soap:body use="literal"/>
-      </wsdl:input>
-      <wsdl:output>
-        <soap:body use="literal"/>
-      </wsdl:output>
-    </wsdl:operation>
 <!-- #### getNames #### //-->
     <wsdl:operation name="getNames">
       <soap:operation soapAction="http://textgrid.info/namespaces/middleware/tgauth/getNames"/>
-- 
GitLab