You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/02/15 14:38:39 UTC

[05/12] airavata-php-gateway git commit: AIRAVATA-2312 Removing unused method

AIRAVATA-2312 Removing unused method

AdminController::updateUserRoles isn't routed to or referenced internally


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/773e542c
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/773e542c
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/773e542c

Branch: refs/heads/dreg-gateway
Commit: 773e542c47fbaa1db59739852c2d67717aea3bdd
Parents: 6f55b5b
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Feb 9 10:22:55 2017 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Feb 9 10:22:55 2017 -0500

----------------------------------------------------------------------
 app/controllers/AdminController.php | 15 ---------------
 1 file changed, 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/773e542c/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index d0aa3e5..1ecce03 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -278,21 +278,6 @@ class AdminController extends BaseController {
 		return View::make("admin/manage-credentials", array("tokens" => $tokens , "pwdTokens" => $pwdTokens) );
 	}
 
-	public function updateUserRoles(){
-		if( Input::has("add")){
-			WSIS::updateUserRoles(Input::get("username"), array("new"=> Input::get("roles"), "deleted" => array() ) );
-			$roles = WSIS::getUserRoles(Input::get("username"));
-			if(in_array(Config::get("pga_config.wsis")["admin-role-name"], $roles) || in_array(Config::get("pga_config.wsis")["read-only-admin-role-name"], $roles)
-				|| in_array(Config::get("pga_config.wsis")["user-role-name"], $roles)){
-				$userProfile = WSIS::getUserProfile(Input::get("username"));
-				$recipients = array($userProfile["email"]);
-				$this->sendAccessGrantedEmailToTheUser(Input::get("username"), $recipients);
-			}
-		}
-		else
-			return WSIS::updateUserRoles(Input::get("username"), array("new"=> array(), "deleted" => Input::get("roles") ) );
-	}
-
 	private function sendAccessGrantedEmailToTheUser($username, $recipients){
 
 		$mail = new PHPMailer;