airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [16/50] [abbrv] airavata-php-gateway git commit: hiding internal roles from IS
Date Thu, 14 Jan 2016 15:43:12 GMT
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 <supun.nakandala@gmail.com>
Authored: Tue Dec 15 11:24:07 2015 -0500
Committer: scnakandala <supun.nakandala@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
      *


Mime
View raw message