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/11/03 21:06:43 UTC

[airavata-php-gateway] branch master updated (1adc6d8 -> 4f5aff9)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git.


    from 1adc6d8  Merge branch 'AIRAVATA-2508'
     new 2203586  [JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields Issue Resolved
     new 4f5aff9  AIRAVATA-2444 Fix searchUsers to return user fields

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

-- 
To stop receiving notification emails like this one, please contact
['"commits@airavata.apache.org" <co...@airavata.apache.org>'].

[airavata-php-gateway] 02/02: AIRAVATA-2444 Fix searchUsers to return user fields

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git

commit 4f5aff994fce8537dfa4f4f0e03685c5a6fdd396
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Oct 16 14:39:18 2017 -0400

    AIRAVATA-2444 Fix searchUsers to return user fields
---
 app/libraries/Keycloak/Keycloak.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/libraries/Keycloak/Keycloak.php b/app/libraries/Keycloak/Keycloak.php
index 18dce8f..6b7efe8 100644
--- a/app/libraries/Keycloak/Keycloak.php
+++ b/app/libraries/Keycloak/Keycloak.php
@@ -267,7 +267,7 @@ class Keycloak {
         $users = $this->users->searchUsers($this->realm, $phrase);
         $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;
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <co...@airavata.apache.org>.

[airavata-php-gateway] 01/02: [JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields Issue Resolved

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git

commit 220358606b41d35b9685faa5820ab2b6aa22d4cc
Author: stephenpaul2727 <st...@gmail.com>
AuthorDate: Sun Oct 8 14:45:42 2017 -0400

    [JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields
    Issue Resolved
---
 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(-)

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;
     }
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;
     }
 }
+
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

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <co...@airavata.apache.org>.