Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 1f1d1ad18 -> 9b2af829c


fixing AIRAVATA-2269 The gateway admin cannot get access to the gateway even 
with 'admin' role


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/9b2af829
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9b2af829
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9b2af829

Branch: refs/heads/develop
Commit: 9b2af829c7e1772ba590584d0800fa3e683de669
Parents: 1f1d1ad
Author: scnakandala <[email protected]>
Authored: Wed Dec 14 12:25:00 2016 -0500
Committer: scnakandala <[email protected]>
Committed: Wed Dec 14 12:25:00 2016 -0500

----------------------------------------------------------------------
 app/libraries/Wsis/Wsis.php | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b2af829/app/libraries/Wsis/Wsis.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php
index b2ea69e..79afac7 100755
--- a/app/libraries/Wsis/Wsis.php
+++ b/app/libraries/Wsis/Wsis.php
@@ -419,8 +419,27 @@ class Wsis {
     public function createTenant($active, $adminUsername, $adminPassword, 
$email,
                                   $firstName, $lastName, $tenantDomain){
         try {
-            return $this->tenantManager->addTenant($active, $adminUsername, 
$adminPassword, $email,
+            $tm = $this->tenantManager->addTenant($active, $adminUsername, 
$adminPassword, $email,
                 $firstName, $lastName, $tenantDomain);
+            $wsisConfig = Config::get('pga_config.wsis');
+            $context = stream_context_create(array(
+                'ssl' => array(
+                    'verify_peer' => $wsisConfig['verify-peer'],
+                    "allow_self_signed"=> 
$wsisConfig['allow-self-signed-cert'],
+                    'cafile' => $wsisConfig['cafile-path'],
+                )
+            ));
+            $parameters = array(
+                'login' => $adminUsername,
+                'password' => $adminPassword,
+                'stream_context' => $context,
+                'trace' => 1,
+                'features' => SOAP_WAIT_ONE_WAY_CALLS,
+                'cache_wsdl' => WSDL_CACHE_BOTH
+            );
+            $userProfileManager = new 
UserProfileManager($wsisConfig['service-url'], $parameters);
+            $userProfileManager->updateUserProfile($adminUsername, $email, 
$firstName, $lastName);
+            return $tm;
         } catch (Exception $ex) {
             throw new Exception("Unable to create Tenant.", 0, $ex);
         }

Reply via email to