From ac94712fc239a4c757da89f1fc7f2e20cf8584cd Mon Sep 17 00:00:00 2001
From: kalavt <443311+kalavt@users.noreply.github.com>
Date: Thu, 29 Aug 2024 11:30:09 +0800
Subject: [PATCH 1/3] Update setting.html change user display name from ID to
 name

---
 apollo-portal/src/main/resources/static/app/setting.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apollo-portal/src/main/resources/static/app/setting.html b/apollo-portal/src/main/resources/static/app/setting.html
index 698a9693d18..22827bd5139 100644
--- a/apollo-portal/src/main/resources/static/app/setting.html
+++ b/apollo-portal/src/main/resources/static/app/setting.html
@@ -75,7 +75,7 @@ <h5>{{'App.Setting.Admin' | translate }}
                             <div class="item-container">
 
                                 <div class="btn-group item-info" ng-repeat="user in appRoleUsers.masterUsers">
-                                    <button type="button" class="btn btn-default" ng-bind="user.userId"></button>
+                                    <button type="button" class="btn btn-default" ng-bind="user.name"></button>
                                     <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                                         aria-haspopup="true" aria-expanded="false"
                                         ng-click="removeMasterRoleFromUser(user.userId)">
@@ -220,4 +220,4 @@ <h4 translate="App.Setting.NoPermissionTips" translate-value-users="{{admins.joi
     <script type="application/javascript" src="../scripts/controller/SettingController.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>

From d21a03c1ec8ec0166c1f873d8d83233f484c355e Mon Sep 17 00:00:00 2001
From: kalavt <443311+kalavt@users.noreply.github.com>
Date: Thu, 29 Aug 2024 11:35:27 +0800
Subject: [PATCH 2/3] Update system-role-manage.html set. user display name
 from ID to name

---
 .../src/main/resources/static/system-role-manage.html         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apollo-portal/src/main/resources/static/system-role-manage.html b/apollo-portal/src/main/resources/static/system-role-manage.html
index 38ecdb39af5..cabc6b252eb 100644
--- a/apollo-portal/src/main/resources/static/system-role-manage.html
+++ b/apollo-portal/src/main/resources/static/system-role-manage.html
@@ -65,10 +65,10 @@ <h5>{{'SystemRole.AddCreateAppRoleToUser' | translate }}
                                         <h5>{{'SystemRole.AuthorizedUser' | translate }}</h5>
                                         <div class="btn-group item-info"
                                             ng-repeat="user in hasCreateApplicationPermissionUserList">
-                                            <button type="button" class="btn btn-default" ng-bind="user"></button>
+                                            <button type="button" class="btn btn-default" ng-bind="user.name"></button>
                                             <button type="button" class="btn btn-default dropdown-toggle"
                                                 data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
-                                                ng-click="deleteCreateApplicationRoleFromUser(user)">
+                                                ng-click="deleteCreateApplicationRoleFromUser(user.userId)">
                                                 <span class="glyphicon glyphicon-remove"></span>
                                             </button>
                                         </div>

From 88571d06373f954c54c331fd20768424c6a1686b Mon Sep 17 00:00:00 2001
From: kalavt <443311+kalavt@users.noreply.github.com>
Date: Thu, 29 Aug 2024 11:43:19 +0800
Subject: [PATCH 3/3] Update PermissionController.java to return user
 information with name

---
 .../apollo/portal/controller/PermissionController.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java
index 8cc166ce26d..d3f5f7a41db 100644
--- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java
+++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java
@@ -323,9 +323,8 @@ public ResponseEntity<Void> deleteCreateApplicationRoleFromUser(@PathVariable("u
 
   @PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
   @GetMapping("/system/role/createApplication")
-  public List<String> getCreateApplicationRoleUsers() {
-    return rolePermissionService.queryUsersWithRole(SystemRoleManagerService.CREATE_APPLICATION_ROLE_NAME)
-            .stream().map(UserInfo::getUserId).collect(Collectors.toList());
+  public Set<UserInfo> getCreateApplicationRoleUsers() {
+    return rolePermissionService.queryUsersWithRole(SystemRoleManagerService.CREATE_APPLICATION_ROLE_NAME);
   }
 
   @GetMapping("/system/role/createApplication/{userId}")