liqingwang commented on code in PR #10451:
URL: https://github.com/apache/dolphinscheduler/pull/10451#discussion_r899721325
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java:
##########
@@ -37,7 +38,10 @@ public User login(String userId, String password, String
extra) {
//check if user exist
user = usersService.getUserByUserName(userId);
if (user == null) {
- user =
usersService.createUser(ldapService.getUserType(userId), userId, ldapEmail);
+ LdapUserNotExistActionType type =
ldapService.getLdapUserNotExistAction();
+ if(type == LdapUserNotExistActionType.CREATE){
+ user =
usersService.createUser(ldapService.getUserType(userId), userId, ldapEmail);
+ }
Review Comment:
Yeah, It will be more elegant, Done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]