airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: appending the last commit
Date Fri, 27 Jan 2017 17:03:31 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 3c9453752 -> dae6cd756


appending the last commit


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/dae6cd75
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/dae6cd75
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/dae6cd75

Branch: refs/heads/develop
Commit: dae6cd756b888fc3576e86a738d66e7da5bf355e
Parents: 3c94537
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Fri Jan 27 12:03:28 2017 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Fri Jan 27 12:03:28 2017 -0500

----------------------------------------------------------------------
 app/controllers/AccountController.php | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dae6cd75/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index baa8e07..1490ee1 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -116,6 +116,13 @@ class AccountController extends BaseController
             $username = $userProfile['username'];
             $userRoles = $userProfile['roles'];
 
+            //FIXME There is a bug in WSO2 IS which doest not return the admin role for the
default admin user.
+            //FIXME Hence as a workaround we manually add it here.
+            if ($username == Config::get('pga_config.wsis')['admin-username']
+                || $username == Config::get('pga_config.wsis')['admin-username'] . '@' .
Config::get('pga_config.wsis')['tenant-domain']){
+                $userRoles[] = Config::get('pga_config.wsis')['admin-role-name'];
+            }
+
             $authzToken = new Airavata\Model\Security\AuthzToken();
             $authzToken->accessToken = $accessToken;
             $authzToken->claimsMap['gatewayID'] = Config::get('pga_config.airavata')['gateway-id'];


Mime
View raw message