Browse Source

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

* Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java

Co-authored-by: Eric 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: Eric 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: fuchanghai <changhai.fu@marketingforce.com>
Co-authored-by: Eric Gao <ericgao.apache@gmail.com>
3.1.0-release
fuchanghai 2 years ago committed by GitHub
parent
commit
8ded072f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
  2. 8
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapAuthenticator.java
  3. 5
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/pwd/PasswordAuthenticator.java

2
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;

8
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;

5
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) {

Loading…
Cancel
Save