Пример #1
0
 private static void ResetHasDlpDetectedClassifications(Attachment attachment)
 {
     if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment))
     {
         attachment.Delete(AttachmentSchema.HasDlpDetectedClassifications);
         attachment.Save();
     }
 }
Пример #2
0
        public override void SetHasDlpDetectedClassifications()
        {
            base.StoreItem[ItemSchema.HasDlpDetectedClassifications] = string.Empty;
            AttachmentCollection attachmentCollection = base.StoreItem.AttachmentCollection;

            if (attachmentCollection != null)
            {
                foreach (AttachmentHandle handle in attachmentCollection)
                {
                    using (Attachment attachment = base.StoreItem.AttachmentCollection.Open(handle))
                    {
                        if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment))
                        {
                            attachment[AttachmentSchema.HasDlpDetectedClassifications] = string.Empty;
                            attachment.Save();
                        }
                    }
                }
            }
        }
        // Token: 0x06001564 RID: 5476 RVA: 0x0004C0E8 File Offset: 0x0004A2E8
        public override void SetHasDlpDetectedClassifications()
        {
            this.ResetClassifiedParts();
            this.clientScanResultStorage.ClassifiedParts.Add(ScanResultStorageProvider.MessageBodyName);
            AttachmentCollection attachmentCollection = base.StoreItem.AttachmentCollection;

            if (attachmentCollection != null)
            {
                foreach (AttachmentHandle handle in attachmentCollection)
                {
                    using (Attachment attachment = base.StoreItem.AttachmentCollection.Open(handle))
                    {
                        if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment))
                        {
                            this.clientScanResultStorage.ClassifiedParts.Add(string.Format(ScanResultStorageProvider.UniqueIdFormat, attachment.FileName, attachment.Id.ToBase64String()));
                        }
                    }
                }
            }
        }
        public virtual void RefreshAttachmentClassifications()
        {
            List <string>        list = new List <string>();
            AttachmentCollection attachmentCollection = this.StoreItem.AttachmentCollection;

            if (attachmentCollection != null && attachmentCollection.Count > 0)
            {
                foreach (AttachmentHandle handle in attachmentCollection)
                {
                    using (Attachment attachment = this.StoreItem.AttachmentCollection.Open(handle))
                    {
                        if (!ScanResultStorageProvider.IsExcludedFromDlp(attachment))
                        {
                            list.Add(string.Format(ScanResultStorageProvider.UniqueIdFormat, attachment.FileName, attachment.Id.ToBase64String()));
                        }
                    }
                }
            }
            list.Add(ScanResultStorageProvider.MessageBodyName);
            IEnumerable <DiscoveredDataClassification> dlpDetectedClassificationObjects = FipsResultParser.DeleteClassifications(this.GetDlpDetectedClassificationObjects(), list, true);

            this.SetDlpDetectedClassificationObjects(dlpDetectedClassificationObjects);
        }
        public virtual bool NeedsClassificationForBodyOrAnyAttachments()
        {
            if (this.NeedsClassificationScan())
            {
                return(true);
            }
            AttachmentCollection attachmentCollection = this.StoreItem.AttachmentCollection;

            if (attachmentCollection != null && attachmentCollection.Count > 0)
            {
                foreach (AttachmentHandle handle in attachmentCollection)
                {
                    using (Attachment attachment = this.StoreItem.AttachmentCollection.Open(handle))
                    {
                        if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment) && this.NeedsClassificationScan(attachment))
                        {
                            return(true);
                        }
                    }
                }
                return(false);
            }
            return(false);
        }
 // Token: 0x060014F3 RID: 5363 RVA: 0x0004A560 File Offset: 0x00048760
 public OwaRulesEvaluationContext(RuleCollection rules, ScanResultStorageProvider scanResultStorageProvider, Item item, string fromAddress, ShortList <string> recipients, PolicyTipRequestLogger policyTipRequestLogger) : base(rules, new OwaRulesTracer())
 {
     if (rules == null)
     {
         throw new ArgumentNullException("rules");
     }
     if (scanResultStorageProvider == null)
     {
         throw new ArgumentNullException("scanResultStorageProvider");
     }
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     if (fromAddress == null)
     {
         throw new ArgumentNullException("fromAddress");
     }
     if (policyTipRequestLogger == null)
     {
         throw new ArgumentNullException("policyTipRequestLogger");
     }
     this.Item = item;
     this.ScanResultStorageProvider = scanResultStorageProvider;
     this.FromAddress       = fromAddress;
     this.Recipients        = recipients;
     this.userComparer      = Microsoft.Exchange.Clients.Owa2.Server.Core.UserComparer.CreateInstance();
     this.membershipChecker = new MembershipChecker(this.OrganizationId);
     base.SetConditionEvaluationMode(ConditionEvaluationMode.Full);
     this.policyTipRequestLogger = policyTipRequestLogger;
     this.RuleExecutionMonitor   = new RuleHealthMonitor(RuleHealthMonitor.ActivityType.Execute, 1L, 0L, delegate(string eventMessageDetails)
     {
     });
     this.RuleExecutionMonitor.MtlLogWriter = new RuleHealthMonitor.MtlLogWriterDelegate(this.AppendPerRuleDiagnosticData);
     this.RuleExecutionMonitor.TenantId     = this.OrganizationId.ToString();
 }