未验证 提交 8ded072f 编写于 作者: F fuchanghai 提交者: GitHub

[Improvement-11293][dolphinscheduler-api] remove some variables that redundant...

[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: NEric Gao <ericgao.apache@gmail.com>

* Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Co-authored-by: NEric Gao <ericgao.apache@gmail.com>

* 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: NEric Gao <ericgao.apache@gmail.com>

* [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: Nfuchanghai <changhai.fu@marketingforce.com>
Co-authored-by: NEric Gao <ericgao.apache@gmail.com>
上级 c9cf8c77
......@@ -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;
......
......@@ -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;
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册