You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/01/14 16:43:12 UTC

[16/50] [abbrv] airavata-php-gateway git commit: hiding internal roles from IS

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/develop
Commit: b545744c8a73a9eccba6a3436be126e487bfca80
Parents: cd0cba9
Author: scnakandala <su...@gmail.com>
Authored: Tue Dec 15 11:24:07 2015 -0500
Committer: scnakandala <su...@gmail.com>
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
      *