You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/07/29 19:49:02 UTC

[30/50] [abbrv] airavata-php-gateway git commit: fixing some admin-read-only capability issues

fixing some admin-read-only capability 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/ecf8e5ac
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/ecf8e5ac
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/ecf8e5ac

Branch: refs/heads/master
Commit: ecf8e5ac17ef3aaaf6d79382d40ecbfd2ff92b2f
Parents: e8d679e
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed Jul 22 12:53:51 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed Jul 22 12:53:51 2015 +0530

----------------------------------------------------------------------
 app/controllers/AdminController.php              | 1 +
 app/views/admin/manage-users.blade.php           | 2 ++
 app/views/partials/gateway-preferences.blade.php | 2 ++
 3 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ecf8e5ac/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index d40b7a4..bdd4a0a 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -4,6 +4,7 @@ class AdminController extends BaseController {
 
 	public function __construct()
 	{
+        $this->beforeFilter('verifyadmin');
 		Session::put("nav-active", "user-console");
 	}
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ecf8e5ac/app/views/admin/manage-users.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-users.blade.php b/app/views/admin/manage-users.blade.php
index 58e96b5..bda20f6 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -110,7 +110,9 @@
 <div class="role-block hide">
     <div class="btn-group" role="group">
         <button type="button" class="btn btn-default role-name" disabled>Role</button>
+        @if(Session::has("admin"))
         <button type="button" class="btn btn-default existing-role-button"><span class="glyphicon glyphicon-remove"></span></button>
+        @endif
     </div>
 </div>
 @stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ecf8e5ac/app/views/partials/gateway-preferences.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/gateway-preferences.blade.php b/app/views/partials/gateway-preferences.blade.php
index 82ee995..d0634c2 100644
--- a/app/views/partials/gateway-preferences.blade.php
+++ b/app/views/partials/gateway-preferences.blade.php
@@ -81,7 +81,9 @@
                value="@if( isset( $preferences) ){{$preferences->allocationProjectNumber}}@endif"/>
     </div>
 </div>
+@if(Session::has("admin"))
 <div class="form-group">
     <input type="submit" class="form-control btn btn-primary" value="Set preferences"/>
 </div>
+@endif
 </div>
\ No newline at end of file