Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7FBC118ED2 for ; Thu, 14 Jan 2016 15:42:59 +0000 (UTC) Received: (qmail 2900 invoked by uid 500); 14 Jan 2016 15:42:58 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 2383 invoked by uid 500); 14 Jan 2016 15:42:58 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 930 invoked by uid 99); 14 Jan 2016 15:42:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 15:42:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 93FD0E3885; Thu, 14 Jan 2016 15:42:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: scnakandala@apache.org To: commits@airavata.apache.org Date: Thu, 14 Jan 2016 15:43:12 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Tue Dec 15 11:24:07 2015 -0500 Committer: scnakandala 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 *