|
|
|
@ -48,6 +48,10 @@ public class CheckLdapDirectoryImpl implements CheckLdapDirectory { |
|
|
|
public boolean checkUserLdapDirectory(String username, String directoryPath) throws NamingException { |
|
|
|
//查询文件的域控账号或分组 |
|
|
|
Map<String, String> directoryGroupAccount = this.getDirectoryLdapAccount(directoryPath); |
|
|
|
//检查是否含有Domain Users |
|
|
|
if(directoryGroupAccount.containsKey("Domain Users")){ |
|
|
|
return true; |
|
|
|
} |
|
|
|
//查询用户是否是该文件夹的域控账号或分组 |
|
|
|
//Map<String, String> 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<String, String> getLdapAccountListPage() throws NamingException { |
|
|
|
Properties env = new Properties(); |
|
|
|
|