Exemplo n.º 1
0
        // Token: 0x06000573 RID: 1395 RVA: 0x0002B388 File Offset: 0x00029588
        protected void SetInfobarMessages()
        {
            if (!this.isCalendarItem)
            {
                RenderingUtilities.RenderReplyForwardMessageStatus(base.Item, base.Infobar, base.UserContext);
                if (this.isDelegated)
                {
                    base.Infobar.AddMessageText(string.Format(LocalizedStrings.GetNonEncoded(this.delegateMessage), MeetingUtilities.GetReceivedOnBehalfOfDisplayName((MeetingMessage)base.Item)), InfobarMessageType.Informational);
                }
            }
            object obj = base.Item.TryGetProperty(MessageItemSchema.IsDraft);

            if (obj is bool && (bool)obj)
            {
                if (ObjectClass.IsMeetingResponse(this.ItemType))
                {
                    base.Infobar.AddMessageLocalized(-1981719796, InfobarMessageType.Informational);
                }
            }
            else
            {
                InfobarMessageBuilder.AddImportance(base.Infobar, base.Item);
                InfobarMessageBuilder.AddSensitivity(base.Infobar, base.Item);
            }
            InfobarMessageBuilder.AddFlag(base.Infobar, base.Item, base.UserContext);
        }
Exemplo n.º 2
0
        // Token: 0x06002B6F RID: 11119 RVA: 0x000F3A30 File Offset: 0x000F1C30
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.Message = base.Initialize <MessageItem>(new PropertyDefinition[]
            {
                MessageItemSchema.IsRead,
                BodySchema.Codepage,
                BodySchema.InternetCpid,
                MessageItemSchema.MessageAudioNotes,
                MessageItemSchema.SenderTelephoneNumber,
                ItemSchema.FlagStatus,
                ItemSchema.FlagCompleteTime,
                MessageItemSchema.ReplyTime,
                MessageItemSchema.RequireProtectedPlayOnPhone,
                ItemSchema.UtcDueDate,
                ItemSchema.UtcStartDate,
                ItemSchema.ReminderDueBy,
                ItemSchema.ReminderIsSet,
                StoreObjectSchema.EffectiveRights
            });
            this.IrmItemHelper = new IRMItemHelper(this.Message, base.UserContext, base.IsPreviewForm, base.IsEmbeddedItem);
            using (UMClientCommon umclientCommon = new UMClientCommon(base.UserContext.ExchangePrincipal))
            {
                this.isUMEnabled          = umclientCommon.IsUMEnabled();
                this.isPlayOnPhoneEnabled = umclientCommon.IsPlayOnPhoneEnabled();
            }
            this.IrmItemHelper.IrmDecryptIfRestricted();
            bool isSuspectedPhishingItem = false;
            bool isLinkEnabled           = false;
            bool flag = false;

            this.isMacintoshPlatform = (Utilities.GetBrowserPlatform(base.Request.UserAgent) == BrowserPlatform.Macintosh);
            JunkEmailUtilities.GetJunkEmailPropertiesForItem(this.Message, base.IsEmbeddedItem, base.ForceEnableItemLink, base.UserContext, out this.isInJunkEmailFolder, out isSuspectedPhishingItem, out isLinkEnabled, out flag);
            this.toolbar             = new ReadMessageToolbar(base.IsInDeleteItems, base.IsEmbeddedItem, this.Message, this.isInJunkEmailFolder, isSuspectedPhishingItem, isLinkEnabled, false, this.IrmItemHelper.IsReplyRestricted, this.IrmItemHelper.IsReplyAllRestricted, this.IrmItemHelper.IsForwardRestricted, this.IrmItemHelper.IsPrintRestricted);
            this.toolbar.ToolbarType = (base.IsPreviewForm ? ToolbarType.Preview : ToolbarType.Form);
            this.recipientWell       = new MessageRecipientWell(this.Message);
            if (flag)
            {
                this.bodyMarkup = Markup.PlainText;
            }
            InfobarMessageBuilder.AddImportance(this.infobar, this.Message);
            InfobarMessageBuilder.AddFlag(this.infobar, this.Message, base.UserContext);
            InfobarMessageBuilder.AddSensitivity(this.infobar, this.Message);
            if (base.UserContext.IsIrmEnabled && Utilities.IsIrmRestrictedAndDecrypted(this.Message))
            {
                InfobarMessageBuilder.AddIrmInformation(this.infobar, this.Message, base.IsPreviewForm, false, false, false);
            }
            if (!this.Message.IsRead && !base.IsPreviewForm && !base.IsEmbeddedItem)
            {
                this.Message.MarkAsRead(Utilities.ShouldSuppressReadReceipt(base.UserContext, this.Message), false);
            }
        }
Exemplo n.º 3
0
 private void RenderMessage()
 {
     if (this.message != null)
     {
         base.CreateAttachmentHelpers(AttachmentWellType.ReadWrite);
         InfobarMessageBuilder.AddSensitivity(base.Infobar, this.message);
         this.message.Load(EditMessage.prefetchProperties);
         InfobarMessageBuilder.AddCompliance(base.UserContext, base.Infobar, this.message, true);
     }
     this.recipientWell  = new MessageRecipientWell(base.UserContext, this.message);
     this.hasRecipients |= this.recipientWell.HasRecipients(RecipientWellType.To);
     this.hasRecipients |= this.recipientWell.HasRecipients(RecipientWellType.Cc);
     this.hasRecipients |= this.recipientWell.HasRecipients(RecipientWellType.Bcc);
 }
Exemplo n.º 4
0
        // Token: 0x060005FE RID: 1534 RVA: 0x000300A8 File Offset: 0x0002E2A8
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (ObjectClass.IsMessage(base.OwaContext.FormsRegistryContext.Type, false))
            {
                this.message = base.Initialize <MessageItem>(ReadMessage.prefetchProperties);
            }
            else
            {
                this.message = base.InitializeAsMessageItem(ReadMessage.prefetchProperties);
            }
            this.recipientWell = new MessageRecipientWell(base.UserContext, this.message);
            RenderingUtilities.RenderReplyForwardMessageStatus(this.message, base.Infobar, base.UserContext);
            object obj = this.message.TryGetProperty(MessageItemSchema.IsDraft);

            if (obj is bool && (bool)obj)
            {
                base.Infobar.AddMessageLocalized(-1981719796, InfobarMessageType.Informational);
            }
            else
            {
                InfobarMessageBuilder.AddImportance(base.Infobar, this.message);
                InfobarMessageBuilder.AddSensitivity(base.Infobar, this.message);
                InfobarMessageBuilder.AddCompliance(base.UserContext, base.Infobar, this.message, false);
                if (Utilities.IsClearSigned(this.message) || Utilities.IsOpaqueSigned(this.message))
                {
                    base.Infobar.AddMessageLocalized(-1329088272, InfobarMessageType.Warning);
                }
                else if (Utilities.IsEncrypted(this.message))
                {
                    base.Infobar.AddMessageLocalized(-767943720, InfobarMessageType.Warning);
                }
            }
            InfobarMessageBuilder.AddFlag(base.Infobar, this.message, base.UserContext);
            if (this.message.Id != null && !this.message.IsRead)
            {
                this.message.MarkAsRead(Utilities.ShouldSuppressReadReceipt(base.UserContext, this.message), false);
            }
            this.isJunk = false;
            if (!this.isEmbeddedItem)
            {
                this.isJunk = Utilities.IsDefaultFolderId(base.Item.Session, this.CurrentFolderId, DefaultFolderType.JunkEmail);
            }
            base.HandleReadReceipt(this.message);
        }
Exemplo n.º 5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.post = base.Initialize <PostItem>(ReadPost.prefetchProperties);
            if (!base.IsPreviewForm && !base.IsEmbeddedItem)
            {
                this.post.MarkAsRead(false);
            }
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;

            JunkEmailUtilities.GetJunkEmailPropertiesForItem(this.post, base.IsEmbeddedItem, base.ForceEnableItemLink, base.UserContext, out this.isInJunkmailFolder, out flag, out flag2, out flag3);
            this.isSuspectedPhishingItemWithoutLinkEnabled = (flag && !flag2);
            this.toolbar = new ReadPostToolbar(base.IsEmbeddedItem, base.Item);
            InfobarMessageBuilder.AddImportance(this.infobar, this.post);
            InfobarMessageBuilder.AddSensitivity(this.infobar, this.post);
            InfobarMessageBuilder.AddFlag(this.infobar, this.post, base.UserContext);
            InfobarMessageBuilder.AddCompliance(base.UserContext, this.infobar, this.post, false);
        }
Exemplo n.º 6
0
 // Token: 0x06002ADF RID: 10975 RVA: 0x000F1888 File Offset: 0x000EFA88
 protected virtual void AddMessagesToInfobar()
 {
     InfobarMessageBuilder.AddImportance(this.infobar, this.Message);
     InfobarMessageBuilder.AddSensitivity(this.infobar, this.Message);
     InfobarMessageBuilder.AddFlag(this.infobar, this.Message, base.UserContext);
     InfobarMessageBuilder.AddCompliance(base.UserContext, this.infobar, this.Message, false);
     InfobarMessageBuilder.AddDeletePolicyInformation(this.infobar, this.Message, base.UserContext);
     this.AddIrmMessageToInfobar();
     if (!base.IsEmbeddedItem && !this.IsPublicItem)
     {
         InfobarMessageBuilder.AddReadReceiptNotice(base.UserContext, this.infobar, this.Message);
     }
     if (ObjectClass.IsTaskRequest(this.Message.ClassName))
     {
         this.infobar.AddMessage(SanitizedHtmlString.FromStringId(357315796), InfobarMessageType.Informational);
     }
     if (TextMessagingUtilities.NeedToAddUnsyncedMessageInfobar(this.Message.ClassName, this.Message, base.UserContext.MailboxSession))
     {
         this.infobar.AddMessage(SanitizedHtmlString.FromStringId(882347163), InfobarMessageType.Informational);
     }
 }
Exemplo n.º 7
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (this.IsPageCacheable)
     {
         Utilities.MakePageCacheable(base.Response);
     }
     else
     {
         Utilities.MakePageNoCacheNoStore(base.Response);
     }
     this.InitializeMessage();
     if (this.PageSupportSmime && this.message != null && Utilities.IsSMime(this.message))
     {
         if (!Utilities.IsSMimeFeatureUsable(base.OwaContext))
         {
             throw new OwaNeedsSMimeControlToEditDraftException(LocalizedStrings.GetNonEncoded(-1507367759));
         }
         if (Utilities.IsFlagSet((int)base.ClientSMimeControlStatus, 1))
         {
             throw new OwaNeedsSMimeControlToEditDraftException(LocalizedStrings.GetNonEncoded(-872682934));
         }
         if (Utilities.IsFlagSet((int)base.ClientSMimeControlStatus, 2))
         {
             throw new OwaNeedsSMimeControlToEditDraftException(LocalizedStrings.GetNonEncoded(-1103993212));
         }
         if (!Utilities.CheckSMimeEditFormBasicRequirement(base.ClientSMimeControlStatus, base.OwaContext))
         {
             throw new OwaNeedsSMimeControlToEditDraftException(LocalizedStrings.GetNonEncoded(-1507367759));
         }
     }
     if (!base.UserContext.IsIrmEnabled && this.message != null && Utilities.IsIrmRestricted(this.message))
     {
         SanitizedHtmlString sanitizedHtmlString = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(1049269714), new object[]
         {
             Utilities.GetOfficeDownloadAnchor(Microsoft.Exchange.Data.Storage.BodyFormat.TextPlain, base.UserContext.UserCulture)
         });
         throw new OwaCannotEditIrmDraftException(sanitizedHtmlString.ToString());
     }
     if (this.message != null)
     {
         string action = base.OwaContext.FormsRegistryContext.Action;
         string state  = base.OwaContext.FormsRegistryContext.State;
         if (string.CompareOrdinal(action, "Reply") == 0 || string.CompareOrdinal(action, "ReplyAll") == 0)
         {
             this.newItemType = NewItemType.Reply;
         }
         else if (string.CompareOrdinal(action, "Forward") == 0)
         {
             this.newItemType = NewItemType.Forward;
         }
         else if (string.Equals(action, "Open", StringComparison.OrdinalIgnoreCase) && string.Equals(state, "Draft", StringComparison.OrdinalIgnoreCase))
         {
             this.newItemType = NewItemType.ExplicitDraft;
             if (this.message.GetValueOrDefault <bool>(MessageItemSchema.HasBeenSubmitted))
             {
                 this.message.AbortSubmit();
             }
         }
         else
         {
             this.newItemType         = NewItemType.ImplicitDraft;
             base.DeleteExistingDraft = true;
         }
     }
     else
     {
         this.CreateDraftMessage();
     }
     if (this.message != null && Utilities.IsPublic(this.message))
     {
         throw new OwaInvalidRequestException("No way to open a public message in edit form");
     }
     if (this.IsSMimeControlNeeded && this.PageSupportSmime)
     {
         this.bodyMarkup = Markup.Html;
     }
     else
     {
         this.bodyMarkup = BodyConversionUtilities.GetBodyFormatOfEditItem(base.Item, this.newItemType, base.UserContext.UserOptions);
     }
     this.SetIsOtherFolder();
     this.infobar.SetInfobarClass("infobarEdit");
     this.infobar.SetShouldHonorHideByDefault(true);
     if (this.newItemType != NewItemType.New)
     {
         if (this.newItemType == NewItemType.ExplicitDraft)
         {
             this.infobar.AddMessage(SanitizedHtmlString.FromStringId(-1981719796), InfobarMessageType.Informational);
         }
         InfobarMessageBuilder.AddSensitivity(this.infobar, this.message);
         if (this.newItemType != NewItemType.ImplicitDraft)
         {
             InfobarMessageBuilder.AddCompliance(base.UserContext, this.infobar, this.message, true);
         }
         if (base.UserContext.IsIrmEnabled && this.message != null)
         {
             InfobarMessageBuilder.AddIrmInformation(this.infobar, this.message, false, true, false, this.IsIrmAsAttachment);
         }
         this.recipientWell       = new MessageRecipientWell(this.message);
         this.showBcc             = (this.recipientWell.HasRecipients(RecipientWellType.Bcc) || base.UserContext.UserOptions.AlwaysShowBcc);
         this.showFrom            = (this.recipientWell.HasRecipients(RecipientWellType.From) || base.UserContext.UserOptions.AlwaysShowFrom || this.isOtherFolder);
         this.toolbar             = this.BuildToolbar();
         this.toolbar.ToolbarType = (base.IsPreviewForm ? ToolbarType.Preview : ToolbarType.Form);
         this.addSignatureToBody  = base.ShouldAddSignatureToBody(this.bodyMarkup, this.newItemType);
     }
     else
     {
         this.recipientWell       = new MessageRecipientWell();
         this.showBcc             = base.UserContext.UserOptions.AlwaysShowBcc;
         this.showFrom            = (base.UserContext.UserOptions.AlwaysShowFrom || this.isOtherFolder);
         this.toolbar             = new EditMessageToolbar(Importance.Normal, this.bodyMarkup, this.IsSMimeControlMustUpdate, this.IsSMimeControlNeeded, false, false);
         this.toolbar.ToolbarType = (base.IsPreviewForm ? ToolbarType.Preview : ToolbarType.Form);
     }
     if (base.OwaContext.UserContext.IsFeatureEnabled(Feature.SMime) && this.PageSupportSmime)
     {
         if (this.IsSMimeControlNeeded && Utilities.IsFlagSet((int)base.ClientSMimeControlStatus, 4))
         {
             this.infobar.AddMessage(SanitizedHtmlString.FromStringId(330022834), InfobarMessageType.Informational);
         }
         else if (this.IsSMimeControlMustUpdate)
         {
             this.infobar.AddMessage(SanitizedHtmlString.FromStringId(1697878138), InfobarMessageType.Informational);
         }
         if (Utilities.IsSMimeControlNeededForEditForm(base.ClientSMimeControlStatus, base.OwaContext) && this.ShowFrom)
         {
             this.infobar.AddMessage(SanitizedHtmlString.FromStringId(-1863471683), InfobarMessageType.Informational);
         }
         if (!Utilities.IsFlagSet((int)base.ClientSMimeControlStatus, 1) && !Utilities.IsFlagSet((int)base.ClientSMimeControlStatus, 16) && !base.OwaContext.UserContext.IsExplicitLogonOthersMailbox)
         {
             this.infobar.AddMessage(SanitizedHtmlString.FromStringId(-1908761042), InfobarMessageType.Warning);
         }
     }
     if (this.Message != null && this.IsRemoveRestricted)
     {
         this.toolbar.IsComplianceButtonEnabledInForm = false;
     }
     if (this.ShowFrom && this.IsFromWellRestricted)
     {
         this.infobar.AddMessage(SanitizedHtmlString.FromStringId(885106754), InfobarMessageType.Informational);
     }
     if (this.message != null && this.newItemType == NewItemType.ExplicitDraft && Utilities.IsInArchiveMailbox(base.Item))
     {
         this.toolbar.IsSendButtonEnabledInForm = false;
     }
 }
Exemplo n.º 8
0
        protected internal override void BuildInfobar()
        {
            InfobarMessageBuilder.AddFlag(this.FormInfobar, this.meetingResponse, this.UserContext);
            if (this.isDraft)
            {
                this.FormInfobar.AddMessage(-1981719796, InfobarMessageType.Informational);
                string format = string.Empty;
                switch (this.meetingResponse.ResponseType)
                {
                case ResponseType.Tentative:
                    format = LocalizedStrings.GetHtmlEncoded(-588720585);
                    break;

                case ResponseType.Accept:
                    format = LocalizedStrings.GetHtmlEncoded(-14610226);
                    break;

                case ResponseType.Decline:
                    format = LocalizedStrings.GetHtmlEncoded(-1615218790);
                    break;
                }
                SanitizedHtmlString messageHtml;
                if (this.meetingResponse.From != null && string.CompareOrdinal(this.UserContext.ExchangePrincipal.LegacyDn, this.meetingResponse.From.EmailAddress) != 0)
                {
                    ADSessionSettings adSettings  = Utilities.CreateScopedADSessionSettings(this.UserContext.LogonIdentity.DomainName);
                    string            displayName = ExchangePrincipal.FromLegacyDN(adSettings, this.meetingResponse.From.EmailAddress).MailboxInfo.DisplayName;
                    messageHtml = SanitizedHtmlString.Format(format, new object[]
                    {
                        displayName
                    });
                }
                else
                {
                    messageHtml = SanitizedHtmlString.Format(format, new object[]
                    {
                        LocalizedStrings.GetNonEncoded(372029413)
                    });
                }
                this.FormInfobar.AddMessage(messageHtml, InfobarMessageType.Informational);
                return;
            }
            string s   = string.Empty;
            string arg = string.Empty;

            if (this.OriginalSender == null || string.IsNullOrEmpty(this.OriginalSender.DisplayName))
            {
                arg = LocalizedStrings.GetNonEncoded(-342979842);
            }
            else
            {
                arg = this.OriginalSender.DisplayName;
            }
            switch (this.meetingResponse.ResponseType)
            {
            case ResponseType.Tentative:
                s = string.Format(Strings.InfoAttendeeTentative, arg);
                break;

            case ResponseType.Accept:
                s = string.Format(Strings.InfoAttendeeAccepted, arg);
                break;

            case ResponseType.Decline:
                s = string.Format(Strings.InfoAttendeeDecline, arg);
                break;
            }
            this.FormInfobar.AddMessage(Utilities.SanitizeHtmlEncode(s), InfobarMessageType.Informational);
            InfobarMessageBuilder.AddImportance(this.FormInfobar, this.meetingResponse);
            InfobarMessageBuilder.AddSensitivity(this.FormInfobar, this.meetingResponse);
            if (this.isDelegated)
            {
                this.FormInfobar.AddMessage(Utilities.SanitizeHtmlEncode(string.Format(LocalizedStrings.GetNonEncoded(-1205864060), MeetingUtilities.GetReceivedOnBehalfOfDisplayName(this.meetingResponse))), InfobarMessageType.Informational);
            }
            if (!this.isEmbeddedItem && !Utilities.IsPublic(this.meetingResponse))
            {
                InfobarMessageBuilder.AddReadReceiptNotice(this.UserContext, this.FormInfobar, this.meetingResponse);
            }
        }