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 5EC9518244 for ; Tue, 9 Feb 2016 15:55:33 +0000 (UTC) Received: (qmail 40937 invoked by uid 500); 9 Feb 2016 15:55:33 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 40491 invoked by uid 500); 9 Feb 2016 15:55:32 -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 37875 invoked by uid 99); 9 Feb 2016 15:55:30 -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; Tue, 09 Feb 2016 15:55:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71963E0B28; Tue, 9 Feb 2016 15:55:30 +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: Tue, 09 Feb 2016 15:56:10 -0000 Message-Id: <4a211a0f205049209d746b715accd076@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [42/50] [abbrv] airavata-php-gateway git commit: fixing admin readonly not working issues fixing admin readonly not working issues 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/9c8eb1fd Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9c8eb1fd Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9c8eb1fd Branch: refs/heads/master Commit: 9c8eb1fd7d4113b625c2e06d9746b8c6e3ff17dd Parents: 94f291d Author: scnakandala Authored: Wed Feb 3 08:50:15 2016 -0500 Committer: scnakandala Committed: Wed Feb 3 08:50:15 2016 -0500 ---------------------------------------------------------------------- app/controllers/AccountController.php | 2 +- app/filters.php | 2 +- app/libraries/Wsis/Wsis.php | 5 ++--- app/views/account/dashboard.blade.php | 10 +++++----- app/views/admin/manage-credentials.blade.php | 4 ++++ 5 files changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9c8eb1fd/app/controllers/AccountController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index a213870..a8ac349 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -144,7 +144,7 @@ class AccountController extends BaseController } //only for super admin - if( Config::get('pga_config.portal')['super-admin-portal'] == true){ + if( Config::get('pga_config.portal')['super-admin-portal'] == true && Session::has("admin")){ Session::put("super-admin", true); } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9c8eb1fd/app/filters.php ---------------------------------------------------------------------- diff --git a/app/filters.php b/app/filters.php index 5926e7d..638be33 100755 --- a/app/filters.php +++ b/app/filters.php @@ -120,7 +120,7 @@ Route::filter('verifyauthorizeduser', function () { Route::filter('verifyadmin', function () { if (CommonUtilities::verify_login()) { - if (!(Session::has("admin") || Session::has("admin-read-only"))) { + if (!Session::has("admin") && !Session::has("admin-read-only")) { return Redirect::to("home")->with("admin-alert", true); } } else http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9c8eb1fd/app/libraries/Wsis/Wsis.php ---------------------------------------------------------------------- diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php index b62b254..aa40bda 100755 --- a/app/libraries/Wsis/Wsis.php +++ b/app/libraries/Wsis/Wsis.php @@ -278,8 +278,6 @@ class Wsis { try { $this->userStoreManager->deleteRole($roleName); } catch (Exception $ex) { - var_dump( $ex); exit; - throw new Exception("Unable to delete role", 0, $ex); } } @@ -310,7 +308,8 @@ class Wsis { */ public function getUserRoles( $username){ try { - return $this->userStoreManager->getRoleListOfUser( $username); + $roles = $this->userStoreManager->getRoleListOfUser( $username); + return array_filter($roles, "Wsis::nonInternalRoles"); } catch (Exception $ex) { throw new Exception("Unable to get User roles.", 0, $ex); } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9c8eb1fd/app/views/account/dashboard.blade.php ---------------------------------------------------------------------- diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php index 2de5b68..c210d2c 100644 --- a/app/views/account/dashboard.blade.php +++ b/app/views/account/dashboard.blade.php @@ -19,7 +19,7 @@ {{ Session::forget("message") }} @endif - @if( Session::has('authorized-user') || Session::has('admin') ) + @if( Session::has('authorized-user') || Session::has('admin') || Session::has('admin-read-only') )

Let's get started!

@@ -30,7 +30,7 @@

See what's happening in your projects

-