Esempio n. 1
0
        // Token: 0x06001AB5 RID: 6837 RVA: 0x00070220 File Offset: 0x0006E420
        private bool IsAuthorized(ADRawEntry entry)
        {
            if (this.securityContext == null)
            {
                return(true);
            }
            RestrictionCheckResult restrictionCheckResult = ADRecipientRestriction.CheckDeliveryRestrictionForAuthenticatedSender(this.securityContext, entry, this.session);

            ExTraceGlobals.ADExpansionTracer.TraceDebug <ADObjectId, RestrictionCheckResult, object>((long)this.GetHashCode(), "Sender {0} permission is {1} for recipient {2}", this.securityContext, restrictionCheckResult, entry[ADObjectSchema.Id]);
            return(ADRecipientRestriction.Accepted(restrictionCheckResult));
        }
        // Token: 0x06001AD0 RID: 6864 RVA: 0x0007071C File Offset: 0x0006E91C
        private RestrictionCheckResult Check()
        {
            if (!this.CheckAuthentication())
            {
                return((RestrictionCheckResult)2147483655U);
            }
            RestrictionCheckResult restrictionCheckResult = this.CheckPermissionRestriction();

            if (this.moderationEnabled && ADRecipientRestriction.Accepted(restrictionCheckResult))
            {
                ADRecipientRestriction.tracer.TraceDebug <ADObjectId, RestrictionCheckResult>((long)this.GetHashCode(), "Sender {0} permission check result is {1}, with moderation enabled, now checking moderation bypasses", this.senderId, restrictionCheckResult);
                restrictionCheckResult = this.CheckModerationBypass();
            }
            ADRecipientRestriction.tracer.TraceDebug <ADObjectId, RestrictionCheckResult>((long)this.GetHashCode(), "Sender {0} permission check result is {1}", this.senderId, restrictionCheckResult);
            return(restrictionCheckResult);
        }