Repository: airavata-php-gateway Updated Branches: refs/heads/master cd0cba97e -> b545744c8
hiding internal roles from IS 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/b545744c Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b545744c Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b545744c Branch: refs/heads/master Commit: b545744c8a73a9eccba6a3436be126e487bfca80 Parents: cd0cba9 Author: scnakandala <[email protected]> Authored: Tue Dec 15 11:24:07 2015 -0500 Committer: scnakandala <[email protected]> Committed: Tue Dec 15 11:24:07 2015 -0500 ---------------------------------------------------------------------- app/libraries/Wsis/Wsis.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b545744c/app/libraries/Wsis/Wsis.php ---------------------------------------------------------------------- diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php index f3e1e55..b62b254 100755 --- a/app/libraries/Wsis/Wsis.php +++ b/app/libraries/Wsis/Wsis.php @@ -291,12 +291,18 @@ class Wsis { */ public function getAllRoles(){ try { - return $this->userStoreManager->getRoleNames(); + $roles = $this->userStoreManager->getRoleNames(); + return array_filter($roles, "Wsis::nonInternalRoles"); + var_dump($roles);exit; } catch (Exception $ex) { throw new Exception("Unable to get all roles", 0, $ex); } } + public function nonInternalRoles($var){ + return 0 !== strpos($var, 'Internal/'); + } + /** * Function to get role of a user *
