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/dreg-gateway Commit: dae6cd756b888fc3576e86a738d66e7da5bf355e Parents: 3c94537 Author: scnakandala <supun.nakand...@gmail.com> Authored: Fri Jan 27 12:03:28 2017 -0500 Committer: scnakandala <supun.nakand...@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'];