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();