You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2015/12/11 19:31:04 UTC
[2/6] airavata-php-gateway git commit: Super admin added to session
in login methods itself instead of at dashboard space
Super admin added to session in login methods itself instead of at dashboard space
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/24601965
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/24601965
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/24601965
Branch: refs/heads/master
Commit: 2460196534202fadeeb0313ba3fe346ab08d4e7b
Parents: 934bca9
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Dec 11 12:29:29 2015 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Dec 11 12:29:29 2015 -0500
----------------------------------------------------------------------
app/controllers/AdminController.php | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/24601965/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index f2b12b4..855d274 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -9,11 +9,7 @@ class AdminController extends BaseController {
}
public function dashboard(){
- //only for super admin
- if( Config::get('pga_config.wsis')['tenant-domain'] == "")
- Session::put("scigap_admin", true);
-
- return View::make("account/dashboard");
+ return View::make("account/dashboard");
}
public function addAdminSubmit(){
@@ -68,12 +64,7 @@ class AdminController extends BaseController {
"crData" => $crData,
"tokens" => $tokens
);
- //var_dump( $gateways); exit;
- if( Session::has("scigap_admin"))
- $view = "scigap-admin/manage-gateway";
- else{
- $view = "admin/manage-gateway";
- }
+ $view = "admin/manage-gateway";
Session::put("admin-nav", "gateway-prefs");
return View::make( $view, $gatewayData);
@@ -179,7 +170,9 @@ class AdminController extends BaseController {
$tm = WSIS::createTenant(1, $inputs["admin-username"] . "@" . $inputs["domain"], $inputs["admin-password"],
$inputs["admin-email"], $inputs["admin-firstname"], $inputs["admin-lastname"], $inputs["domain"]);
- return $gateway;
+ Session::put("message", "Gateway " . $inputs["gatewayName"] . " has been added.");
+ return Response::json( $tm);
+ //return Redirect::to("admin/dashboard/gateway")->with("message", "Gateway has been successfully added.");
}