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/12/13 20:27:22 UTC

[airavata-php-gateway] branch develop updated (28de925 -> 44bd55e)

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

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


    from 28de925  Merge branch 'neeraj-lad-AIRAVATA-2509' into develop
     new 9e22a81  AIRAVATA-2571 Add userEnabled to getUsersWithRole
     new 766ff97  Merge branch 'AIRAVATA-2571-email-verified' into develop
     new 44bd55e  AIRAVATA-2571 User enabled instead of email verified

The 3 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 | 3 ++-
 app/libraries/Keycloak/Keycloak.php         | 6 ++++--
 app/views/admin/manage-users.blade.php      | 7 ++++---
 3 files changed, 10 insertions(+), 6 deletions(-)

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

[airavata-php-gateway] 03/03: AIRAVATA-2571 User enabled instead of email verified

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

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

commit 44bd55e70020e91150fcbb8fc5d3854bcd850223
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Dec 13 15:27:12 2017 -0500

    AIRAVATA-2571 User enabled instead of email verified
---
 app/libraries/Keycloak/Keycloak.php    | 6 ++++--
 app/views/admin/manage-users.blade.php | 7 ++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/app/libraries/Keycloak/Keycloak.php b/app/libraries/Keycloak/Keycloak.php
index 5315c6e..46b5c94 100644
--- a/app/libraries/Keycloak/Keycloak.php
+++ b/app/libraries/Keycloak/Keycloak.php
@@ -259,7 +259,8 @@ class Keycloak {
         $users = $this->users->getUsers($this->realm);
         $usernames = [];
         foreach ($users as $user) {
-            array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"emailVerified"=>$user->emailVerified,"userName"=>$user->username]);
+            Log::debug("user", array($user));
+            array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"userEnabled"=>$user->enabled,"userName"=>$user->username]);
         }
         return $usernames;
     }
@@ -275,7 +276,7 @@ class Keycloak {
         $users = $this->users->searchUsers($this->realm, $phrase);
         $usernames = [];
         foreach ($users as $user) {
-            array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"userName"=>$user->username]);
+            array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"userEnabled"=>$user->enabled,"userName"=>$user->username]);
         }
         return $usernames;
     }
@@ -374,6 +375,7 @@ class Keycloak {
             $result["email"] = $user->email;
             $result["firstname"] = $user->firstName;
             $result["lastname"] = $user->lastName;
+            $result["userEnabled"] = $user->enabled;
             return $result;
         }else{
             return [];
diff --git a/app/views/admin/manage-users.blade.php b/app/views/admin/manage-users.blade.php
index 166ca0f..e2affb8 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -58,7 +58,7 @@
                         <th>Last Name</th>
                         <th>Username</th>
                         <th>Email</th>
-                        <th>Email Verified</th>
+                        <th>User Enabled</th>
 
                         <th>
                             Role :
@@ -86,14 +86,15 @@
                         <td>{{ $user->lastName }}</td>
                         <td>{{ $user->userName }}</td>
                         <td>{{ $user->email }}</td>
-                        @if($user->emailVerified)
+                        @if($user->userEnabled)
                             <td class="text-success"><span class="glyphicon glyphicon-ok"></span></td>
                         @else
                             <td class="text-danger"><span class="glyphicon glyphicon-remove"></span></td>
                         @endif
                         <td>
                             <button class="button btn btn-default check-roles" type="button"
-                                    data-username="{{$user->userName}}">Check All Roles
+                                    data-username="{{$user->userName}}"
+                                    @if(!$user->userEnabled)disabled @endif>Check All Roles
                             </button>
                             <div class="user-roles"></div>
                         </td>

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

[airavata-php-gateway] 01/03: AIRAVATA-2571 Add userEnabled to getUsersWithRole

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

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

commit 9e22a81645183fe93585c11a00b7505a6e21e77a
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Dec 13 15:16:41 2017 -0500

    AIRAVATA-2571 Add userEnabled to getUsersWithRole
---
 app/libraries/IamAdminServicesUtilities.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/libraries/IamAdminServicesUtilities.php b/app/libraries/IamAdminServicesUtilities.php
index 3ba50df..b5623c5 100644
--- a/app/libraries/IamAdminServicesUtilities.php
+++ b/app/libraries/IamAdminServicesUtilities.php
@@ -1,4 +1,5 @@
 <?php
+use Airavata\Model\User\Status;
 
 class IamAdminServicesUtilities {
 
@@ -33,7 +34,7 @@ class IamAdminServicesUtilities {
         $user_profiles = IamAdminServices::getUsersWithRole($authz_token, $role_name);
         $users = [];
         foreach ($user_profiles as $user_profile) {
-            array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId]);
+            array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId, "userEnabled"=>$user_profile->State == Status::CONFIRMED]);
         }
         return $users;
     }

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

[airavata-php-gateway] 02/03: Merge branch 'AIRAVATA-2571-email-verified' into develop

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

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

commit 766ff97d7c1c1f81798cc73ecf7e3b4adeb2090c
Merge: 28de925 9e22a81
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Dec 13 15:18:40 2017 -0500

    Merge branch 'AIRAVATA-2571-email-verified' into develop

 app/libraries/IamAdminServicesUtilities.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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