// Token: 0x06000BCE RID: 3022 RVA: 0x0004DF24 File Offset: 0x0004C124 internal static bool InRole(IRecipientSession rs, ADRecipient recipient, MultiValuedProperty <string> roleMembersLegDN, MultiValuedProperty <ADObjectId> roleMemberslegacy) { if (recipient == null) { return(false); } if (roleMemberslegacy == null && roleMembersLegDN == null) { return(false); } if (roleMembersLegDN != null && roleMembersLegDN.Count != 0) { foreach (string text in roleMembersLegDN) { if (string.Equals(text, recipient.LegacyExchangeDN, StringComparison.InvariantCultureIgnoreCase)) { return(true); } ADRecipient adrecipient = rs.FindByLegacyExchangeDN(text); if (adrecipient != null && adrecipient is ADGroup && recipient.IsMemberOf(adrecipient.Id, false)) { BookingPolicy.Tracer.TraceDebug((long)recipient.GetHashCode(), "{0}: Group match", new object[] { TraceContext.Get() }); return(true); } } } if (roleMemberslegacy != null && roleMemberslegacy.Count != 0) { foreach (ADObjectId adobjectId in roleMemberslegacy) { if (ADObjectId.Equals(adobjectId, recipient.Id)) { return(true); } ADRecipient adrecipient2 = rs.Read(adobjectId); if (adrecipient2 != null && adrecipient2 is ADGroup && recipient.IsMemberOf(adrecipient2.Id, false)) { BookingPolicy.Tracer.TraceDebug((long)recipient.GetHashCode(), "{0}: Group match", new object[] { TraceContext.Get() }); return(true); } } } return(false); }
// Token: 0x06001AB8 RID: 6840 RVA: 0x000702FC File Offset: 0x0006E4FC private bool IsMemberOf(IEnumerable <ADObjectId> groupIdList) { foreach (ADObjectId adobjectId in groupIdList) { if (ADRecipient.IsMemberOf(this.securityContext, adobjectId, false, this.session)) { ExTraceGlobals.ADExpansionTracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "Sender {0} is a member of group {1}", this.securityContext, adobjectId); return(true); } } return(false); }
// Token: 0x060019CF RID: 6607 RVA: 0x0006CE58 File Offset: 0x0006B058 internal bool ContainsMember(ADObjectId memberId, bool directOnly) { ADRecipient adrecipient = base.Session.Read(memberId); return(adrecipient != null && adrecipient.IsMemberOf(base.Id, directOnly)); }