airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [1/2] airavata-php-gateway git commit: [JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields Issue Resolved
Date Mon, 16 Oct 2017 18:35:29 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 5276a786f -> 702abd766


[JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields
Issue Resolved


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

Branch: refs/heads/develop
Commit: f48ea90e0f1aa2de0e1a860222b2adf635b88fb2
Parents: 85c0766
Author: stephenpaul2727 <stephenpaul2727@gmail.com>
Authored: Sun Oct 8 14:45:42 2017 -0400
Committer: stephenpaul2727 <stephenpaul2727@gmail.com>
Committed: Sun Oct 8 14:45:42 2017 -0400

----------------------------------------------------------------------
 app/libraries/IamAdminServicesUtilities.php |  2 +-
 app/libraries/Keycloak/Keycloak.php         |  3 ++-
 app/views/admin/manage-users.blade.php      | 13 ++++++++++---
 3 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f48ea90e/app/libraries/IamAdminServicesUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/IamAdminServicesUtilities.php b/app/libraries/IamAdminServicesUtilities.php
index fbb208e..3ba50df 100644
--- a/app/libraries/IamAdminServicesUtilities.php
+++ b/app/libraries/IamAdminServicesUtilities.php
@@ -33,7 +33,7 @@ class IamAdminServicesUtilities {
         $user_profiles = IamAdminServices::getUsersWithRole($authz_token, $role_name);
         $users = [];
         foreach ($user_profiles as $user_profile) {
-            $users[] = $user_profile->userId;
+            array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId]);
         }
         return $users;
     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f48ea90e/app/libraries/Keycloak/Keycloak.php
----------------------------------------------------------------------
diff --git a/app/libraries/Keycloak/Keycloak.php b/app/libraries/Keycloak/Keycloak.php
index 25a059e..18dce8f 100644
--- a/app/libraries/Keycloak/Keycloak.php
+++ b/app/libraries/Keycloak/Keycloak.php
@@ -251,7 +251,7 @@ class Keycloak {
         $users = $this->users->getUsers($this->realm);
         $usernames = [];
         foreach ($users as $user) {
-            $usernames[] = $user->username;
+            array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"userName"=>$user->username]);
         }
         return $usernames;
     }
@@ -447,3 +447,4 @@ class Keycloak {
         return $json;
     }
 }
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f48ea90e/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 c8ea524..1b038cb 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -54,7 +54,11 @@
 
                 <table class="table table-striped table-condensed">
                     <tr>
+                        <th>First Name</th>
+                        <th>Last Name</th>
                         <th>Username</th>
+                        <th>Email</th>
+
                         <th>
                             Role :
                             <select onchange="location = this.options[this.selectedIndex].value;">
@@ -77,10 +81,13 @@
                     </tr>
                     @foreach( (array)$users as $user)
                     <tr class="user-row">
-                        <td>{{ $user }}</td>
+                        <td>{{ $user->firstName }}</td>
+                        <td>{{ $user->lastName }}</td>
+                        <td>{{ $user->userName }}</td>
+                        <td>{{ $user->email }}</td>
                         <td>
                             <button class="button btn btn-default check-roles" type="button"
-                                    data-username="{{$user}}">Check All Roles
+                                    data-username="{{$user->userName}}">Check All Roles
                             </button>
                             <div class="user-roles"></div>
                         </td>
@@ -280,4 +287,4 @@
         });
     }
 </script>
-@stop
\ No newline at end of file
+@stop


Mime
View raw message