Exemplo n.º 1
0
        public string[] GetNonMembers(string usertocheck, string[] groupstocheck) 
        {
            if (usertocheck == null || groupstocheck == null)
            {
                string msg = ResourceManager.GetString("LDAP_INVALIDADDR",
                    "Workshare.DirectorySearcher.Exceptions", typeof(DirectoryAnalyzerImpl).Assembly);
				Logger.LogInfo(msg);
                throw (new ArgumentNullException(msg));
            }

            string[] addrs = new string[0];

            if (IsLdapAvailable)
            {
                IAddress ldapAddress = GetAddressInformation(usertocheck);
                IAddressCollection policyAddresses = new AddressCollection(m_engine);
                policyAddresses.Add(ldapAddress);
                IAddressCollection groupAddresses = GetAddressCollectionInformation(groupstocheck);
                policyAddresses.ContainMembersOf(groupAddresses);
                addrs =  policyAddresses.GetAddresses(false);
            }
            return addrs;
        }