You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/10/08 02:33:53 UTC

[GitHub] [incubator-streampark] MonsterChenzhuo commented on a diff in pull request #1734: [Improve]Splitting ldap logic

MonsterChenzhuo commented on code in PR #1734:
URL: https://github.com/apache/incubator-streampark/pull/1734#discussion_r990576020


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java:
##########
@@ -124,4 +116,24 @@ private Map<String, Object> generateUserInfo(JWTToken token, User user) {
         return userInfo;
     }
 
+    private Map<String, Object> login(String username, String password, User user) throws Exception {
+        if (user == null) {
+            return RestResponse.success().put("code", 0);
+        }
+
+        if (User.STATUS_LOCK.equals(user.getStatus())) {
+            return RestResponse.success().put("code", 1);
+        }

Review Comment:
   @1996fanrui 
   <img width="957" alt="图片" src="https://user-images.githubusercontent.com/60029759/194683538-860cf1c2-a0aa-4271-9f58-60b9c8a294f1.png">
   Do you think it's okay to make changes like this?
   This `RestResponse.fail("The user is currently locked", 1L)` second parameter needs to pass an error code, but I saw that the project does not currently have this error code list, so I filled in a random one.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org