Skip to content

Commit d60a646

Browse files
authored
fix(sso):ldap mapper can't load on not local type (#1988)
1 parent 45f6c06 commit d60a646

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

server/starters/web-starter/src/main/java/com/oceanbase/odc/service/iam/auth/ldap/LdapUserDetailsContextMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.Collection;
1919

2020
import org.springframework.beans.factory.annotation.Autowired;
21+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2122
import org.springframework.ldap.core.DirContextAdapter;
2223
import org.springframework.ldap.core.DirContextOperations;
2324
import org.springframework.security.core.GrantedAuthority;
@@ -35,6 +36,7 @@
3536

3637
@Component
3738
@Slf4j
39+
@ConditionalOnProperty(value = {"odc.iam.auth.type"}, havingValue = "local")
3840
public class LdapUserDetailsContextMapper implements UserDetailsContextMapper {
3941

4042
@Autowired

0 commit comments

Comments
 (0)