This is an automated email from the ASF dual-hosted git repository.
lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 8ded072f79 [Improvement-11293][dolphinscheduler-api] remove some
variables that redundant in subclasses of AbstractAuthenticator (#11305)
8ded072f79 is described below
commit 8ded072f799376d9fadb669cb990edd2197d1062
Author: fuchanghai <[email protected]>
AuthorDate: Fri Aug 5 14:11:12 2022 +0800
[Improvement-11293][dolphinscheduler-api] remove some variables that
redundant in subclasses of AbstractAuthenticator (#11305)
* [fix-10729]The request's url given by the test case looks different from
the controller layer. Some usages and parameter format errors
* [fix-10729]The request's url given by the test case looks different from
the controller layer. Some usages and parameter format errors
* [fix-10729]The request's url given by the test case looks different from
the controller layer. Some usages and parameter format errors
* [fix-10729]The request's url given by the test case looks different from
the controller layer. Some usages and parameter format errors
* [fix-10729]fix the code smell
* [fix-10729]decorate DataSourceControllerTest with public
* [fix-10729]replace import *
* [fix-10729]
* [fix-10729]
* [fix-10729]
* [fix-10729]checkstyle
* [Improvement][ExecutorServiceImpl] remove some unnecessary
* [fix-11181]text check and word spell
* Update
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Co-authored-by: Eric Gao <[email protected]>
* Update
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Co-authored-by: Eric Gao <[email protected]>
* Update ExecutorServiceImpl.java
remove the error logging and update the comment
* Update
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Co-authored-by: Eric Gao <[email protected]>
* [Improvement-10760][dolphinscheduler-api] Some variables are redundant
* [Improvement-10760][dolphinscheduler-api] Some variables are redundant
and fix checkstyle
* [Improvement-10760][dolphinscheduler-api] Some variables are redundant
and fix checkstyle
* [Improvement-10760][dolphinscheduler-api] add import
* [Improvement-10760][dolphinscheduler-api] remove not use
* [Improvement-11293][dolphinscheduler-api] remove some variables that
redundant in subclasses of AbstractAuthenticator
* [Improvement-11293][dolphinscheduler-api] remove some variables that
redundant in subclasses of AbstractAuthenticator
Co-authored-by: fuchanghai <[email protected]>
Co-authored-by: Eric Gao <[email protected]>
---
.../dolphinscheduler/api/security/impl/AbstractAuthenticator.java | 2 +-
.../api/security/impl/ldap/LdapAuthenticator.java | 8 +++-----
.../api/security/impl/pwd/PasswordAuthenticator.java | 5 -----
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
index 9f3ff8afcf..17fda8053e 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
@@ -41,7 +41,7 @@ public abstract class AbstractAuthenticator implements
Authenticator {
private static final Logger logger =
LoggerFactory.getLogger(AbstractAuthenticator.class);
@Autowired
- private UsersService userService;
+ protected UsersService userService;
@Autowired
private SessionService sessionService;
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java
index f8247aa8e6..394ed44065 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java
@@ -18,14 +18,12 @@
package org.apache.dolphinscheduler.api.security.impl.ldap;
import org.apache.dolphinscheduler.api.security.impl.AbstractAuthenticator;
-import org.apache.dolphinscheduler.api.service.UsersService;
import org.apache.dolphinscheduler.dao.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
public class LdapAuthenticator extends AbstractAuthenticator {
- @Autowired
- private UsersService usersService;
+
@Autowired
LdapService ldapService;
@@ -35,9 +33,9 @@ public class LdapAuthenticator extends AbstractAuthenticator {
String ldapEmail = ldapService.ldapLogin(userId, password);
if (ldapEmail != null) {
//check if user exist
- user = usersService.getUserByUserName(userId);
+ user = userService.getUserByUserName(userId);
if (user == null && ldapService.createIfUserNotExists()) {
- user =
usersService.createUser(ldapService.getUserType(userId), userId, ldapEmail);
+ user = userService.createUser(ldapService.getUserType(userId),
userId, ldapEmail);
}
}
return user;
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/pwd/PasswordAuthenticator.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/pwd/PasswordAuthenticator.java
index a45bb84604..2dc4ff0463 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/pwd/PasswordAuthenticator.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/pwd/PasswordAuthenticator.java
@@ -18,14 +18,9 @@
package org.apache.dolphinscheduler.api.security.impl.pwd;
import org.apache.dolphinscheduler.api.security.impl.AbstractAuthenticator;
-import org.apache.dolphinscheduler.api.service.UsersService;
import org.apache.dolphinscheduler.dao.entity.User;
-import org.springframework.beans.factory.annotation.Autowired;
-
public class PasswordAuthenticator extends AbstractAuthenticator {
- @Autowired
- private UsersService userService;
@Override
public User login(String userId, String password, String extra) {