2/13/2023 0 Comments Dtsearch searchresultsitem![]() ![]() (LdapHelper.GetAttributeString(entry.Attributes, b.Key = "sAMAccountName") ? string.Empty)) RestHelper.GetAttributeFromReponse(roleXml, b.Value) != ![]() List newMembers = LdapHelper.GetGroupMembers(entry).SelectMany(d => (u => string.Equals(u.DistinguishedName, d, StringComparison.InvariantCultureIgnoreCase))).ToList() List currentMembers = (existing = null) ? new List() : (b => b.RoleId = existing.Id).SelectMany(b => (u => u.Id = b.UserId)).ToList() Var existing = (g => g.Guid = role.Guid) GroupBindings.Select(k => new KeyValuePair(k.Cms, LdapHelper.GetAttributeString(entry.Attributes))).ToList()) LdapHelper.GetAttributeString(entry.Attributes), LdapHelper.GetAttributeString(entry.Attributes, true), Var role = new Role(LdapHelper.GetObjectGuid(entry), Private void HandleGroup(SearchResultEntry entry) ![]() ![]() Return new LdapUser(searchResultEntry.DistinguishedName, tempUserCn, tempUserSn,tempUserOtherAttributes) UserReturnAttribute.GetValues(Type.GetType("System.String")), Convert.ToString))) (string)userReturnAttribute.GetValues(Type.GetType("System.String")) if is CN or SN, set right String else add attribute to dictionary Return new LdapUser(searchResultEntry.DistinguishedName, tempUserCn, tempUserSn, tempUserOtherAttributes) įoreach (DirectoryAttribute userReturnAttribute in ) Var tempUserOtherAttributes = new Dictionary>() Private static ILdapUser ConvertToLdapUser(SearchResultEntry searchResultEntry) / NOT TESTED: Because it's difficult to mockup the SearchResultEntry Obj / Convert an search result entry to the LDAP User Entity ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |