From b1040dc28595995367baf31c8066fbb6c3b013e9 Mon Sep 17 00:00:00 2001 From: rui_li <877258667@qq.com> Date: Mon, 8 Dec 2025 11:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=9F=E6=8E=A7=20Domain=20Users=20=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BA=BA=E9=83=BD=E5=8F=AF=E4=BB=A5=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/service/impl/CheckLdapDirectoryImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/spring/modules/sys/service/impl/CheckLdapDirectoryImpl.java b/src/main/java/com/spring/modules/sys/service/impl/CheckLdapDirectoryImpl.java index 6cbce744..d3832009 100644 --- a/src/main/java/com/spring/modules/sys/service/impl/CheckLdapDirectoryImpl.java +++ b/src/main/java/com/spring/modules/sys/service/impl/CheckLdapDirectoryImpl.java @@ -48,6 +48,10 @@ public class CheckLdapDirectoryImpl implements CheckLdapDirectory { public boolean checkUserLdapDirectory(String username, String directoryPath) throws NamingException { //查询文件的域控账号或分组 Map directoryGroupAccount = this.getDirectoryLdapAccount(directoryPath); + //检查是否含有Domain Users + if(directoryGroupAccount.containsKey("Domain Users")){ + return true; + } //查询用户是否是该文件夹的域控账号或分组 //Map ldapAccountGroup = this.getLapAccountGroup(username); if (directoryGroupAccount.containsKey(username)) { @@ -172,6 +176,7 @@ public class CheckLdapDirectoryImpl implements CheckLdapDirectory { if (checkMemberIsGroupWithName(ctx, strKey)){ System.out.println("新Group:"+strKey); ldapAccount.putAll(getLdapAccountListFromGroup(ctx, strKey)); + ldapAccount.put(strKey, strKey);//添加组信息 }else { ldapAccount.put(strKey, strKey); } @@ -234,10 +239,9 @@ public class CheckLdapDirectoryImpl implements CheckLdapDirectory { /** - * + * 查询用列表 * @return - * @throws NamingException - * @throws 查询用列表 + * @throws NamingException */ public Map getLdapAccountListPage() throws NamingException { Properties env = new Properties();