protected void CreateOutOfOfficeNotification() { this.shouldShowOofDialog = ((base.UserContext.MailboxSession.Mailbox.TryGetProperty(MailboxSchema.MailboxOofState) as bool?) ?? false); if (!this.shouldShowOofDialog || base.UserContext.IsWebPartRequest) { return; } UserOofSettings userOofSettings = null; try { userOofSettings = UserOofSettings.GetUserOofSettings(base.UserContext.MailboxSession); } catch (QuotaExceededException ex) { ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "BasicMessageView.CreateOutOfOfficeNotification: Failed. Exception: {0}", ex.Message); return; } switch (userOofSettings.OofState) { case OofState.Enabled: this.shouldShowOofDialog = base.UserContext.MessageViewFirstRender; break; case OofState.Scheduled: { this.shouldShowOofDialog = false; if (RenderingFlags.HideOutOfOfficeInfoBar(base.UserContext)) { return; } DateTime utcNow = DateTime.UtcNow; DateTime t = DateTime.MinValue; DateTime t2 = DateTime.MinValue; if (userOofSettings.Duration != null) { t = userOofSettings.Duration.StartTime; t2 = userOofSettings.Duration.EndTime; } if (utcNow > t && t2 > utcNow) { ExDateTime exDateTime = new ExDateTime(base.UserContext.TimeZone, userOofSettings.Duration.EndTime); SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-1261886615), new object[] { exDateTime.ToLongDateString() + " " + exDateTime.ToString(base.UserContext.UserOptions.TimeFormat) }); sanitizingStringBuilder.Append(" <a href=# onclick=\"onClkHdOof()\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1303059585)); sanitizingStringBuilder.Append("</a>"); base.Infobar.AddMessageHtml(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational); } return; } default: this.shouldShowOofDialog = false; return; } }
// Token: 0x06002978 RID: 10616 RVA: 0x000E9D34 File Offset: 0x000E7F34 protected void RenderExpiringPasswordNotificationInfobar(Infobar infobar, int daysUntilExpiration) { SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.Append("<div class=\"divIBTxt\">"); if (daysUntilExpiration == 0) { sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(352263686)); } else { sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-2025544575), new object[] { daysUntilExpiration }); } sanitizingStringBuilder.Append("</div>"); sanitizingStringBuilder.Append("<div class=\"divIBTxt\"><a href=# id=\"lnkChgPwd\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-1273337393)); sanitizingStringBuilder.Append("</a></div>"); sanitizingStringBuilder.Append("<div class=\"divIBTxt\"><a href=# id=\"lnkRmvPwdIB\" _sRmvId=\"divPwdIB\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1496915101)); sanitizingStringBuilder.Append("</a></div>"); infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divPwdIB"); }
private void CreateExpiringPasswordNotification() { int num; if (!Utilities.ShouldRenderExpiringPasswordInfobar(base.UserContext, out num)) { return; } SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.Append("<table cellpadding=0 cellspacing=0><tr><td class=tdMvIBSe>"); if (num == 0) { sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(352263686)); } else { sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-2025544575), new object[] { num }); } sanitizingStringBuilder.Append("</td>"); sanitizingStringBuilder.Append("<td class=tdMvIBSe><a href=# onClick=\"return onPwdNtf('yes');\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-1273337393)); sanitizingStringBuilder.Append("</a></td>"); sanitizingStringBuilder.Append("<td class=tdMvIBSe><a href=# onClick=\"return onPwdNtf('no');\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1496915101)); sanitizingStringBuilder.Append("</a></td>"); sanitizingStringBuilder.Append("</tr></table>"); base.Infobar.AddMessageHtml(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational); }
// Token: 0x0600297D RID: 10621 RVA: 0x000E9E70 File Offset: 0x000E8070 protected void RenderSMimeControlUpdateInfobar(Infobar infobar) { SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.Append("<div class=\"divIBTxt\">"); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-172046453), new object[] { "<a href=\"/ecp/?p=Security/SMIME.aspx\" target=\"_parent\" class=\"lnk\">", "</a>" }); sanitizingStringBuilder.Append("</div>"); infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divSMimeIB", true); }
private SanitizedHtmlString GetErrorHtml(string errorIconUrl, CultureInfo userCulture) { if (userCulture == null) { throw new ArgumentNullException("userCulture"); } if (!this.failure) { return(SanitizedHtmlString.Empty); } SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.AppendFormat(CultureInfo.InvariantCulture, "<font face=\"{0}\" size=\"2\">", new object[] { Utilities.GetDefaultFontName(userCulture) }); sanitizingStringBuilder.AppendFormat(CultureInfo.InvariantCulture, "<img src=\"{0}\"> {1}", new object[] { errorIconUrl, this.requestStatusMessage }); sanitizingStringBuilder.Append("</font>"); return(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>()); }
// Token: 0x06002977 RID: 10615 RVA: 0x000E9C6C File Offset: 0x000E7E6C protected void RenderOofNotificationInfobar(Infobar infobar) { ExDateTime exDateTime = new ExDateTime(base.UserContext.TimeZone, this.UserOofSettings.Duration.EndTime); SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); sanitizingStringBuilder.Append("<div class=\"divIBTxt\">"); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(-1261886615), new object[] { exDateTime.ToLongDateString() + " " + exDateTime.ToString(base.UserContext.UserOptions.TimeFormat) }); sanitizingStringBuilder.Append("</div>"); sanitizingStringBuilder.Append("<div class=\"divIBTxt\"><a href=# id=\"lnkRmvOofIB\" _sRmvId=\"divOofIB\">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1303059585)); sanitizingStringBuilder.Append("</a></div>"); infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divOofIB"); }
// Token: 0x060022D1 RID: 8913 RVA: 0x000C7398 File Offset: 0x000C5598 public static void AddIrmInformation(Infobar infobar, MessageItem item, bool isPreviewForm, bool addConversationOwner, bool addRemoveLink, bool addAttachDisclaimer) { if (infobar == null) { throw new ArgumentNullException("infobar"); } if (item == null) { throw new ArgumentNullException("item"); } if (addAttachDisclaimer) { infobar.AddMessage(SanitizedHtmlString.FromStringId(-914838464), InfobarMessageType.Informational); } if (!Utilities.IsIrmRestrictedAndDecrypted(item)) { return; } RightsManagedMessageItem rightsManagedMessageItem = (RightsManagedMessageItem)item; SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); string str = string.Format(LocalizedStrings.GetNonEncoded(-500320626), rightsManagedMessageItem.Restriction.Name, rightsManagedMessageItem.Restriction.Description); sanitizingStringBuilder.Append(str); if (addRemoveLink) { sanitizingStringBuilder.Append(" <a id=\"aIbRR\" href=# "); sanitizingStringBuilder.AppendFormat("_sIT=\"IPM.Note\" _sAct=\"{0}\" _fRR=1", new object[] { isPreviewForm ? "Preview" : string.Empty }); sanitizingStringBuilder.Append(">"); sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(540836651)); sanitizingStringBuilder.Append("</a>"); } if (addConversationOwner && !isPreviewForm && rightsManagedMessageItem.ConversationOwner != null && !string.IsNullOrEmpty(rightsManagedMessageItem.ConversationOwner.EmailAddress)) { string str2 = string.Format(LocalizedStrings.GetNonEncoded(1670455506), rightsManagedMessageItem.ConversationOwner.EmailAddress); sanitizingStringBuilder.Append("<br>"); sanitizingStringBuilder.Append(str2); } infobar.AddMessage(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational, "divCmplIB"); }
private static SanitizedHtmlString GetIrmErrorDetails(UserContext userContext, RightsManagedMessageDecryptionStatus decryptionStatus) { if (userContext == null) { throw new ArgumentNullException("userContext"); } SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(); RightsManagementFailureCode failureCode = decryptionStatus.FailureCode; if (failureCode > RightsManagementFailureCode.PreLicenseAcquisitionFailed) { switch (failureCode) { case RightsManagementFailureCode.FailedToExtractTargetUriFromMex: case RightsManagementFailureCode.FailedToDownloadMexData: sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-843834599)); goto IL_308; case RightsManagementFailureCode.GetServerInfoFailed: goto IL_19E; case RightsManagementFailureCode.InternalLicensingDisabled: break; case RightsManagementFailureCode.ExternalLicensingDisabled: sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetNonEncoded(-641698444), new object[] { WebReadyViewUtilities.GetOfficeDownloadAnchor(userContext.UserCulture) }); goto IL_308; default: switch (failureCode) { case RightsManagementFailureCode.ServerRightNotGranted: sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-271360565)); goto IL_308; case RightsManagementFailureCode.InvalidLicensee: goto IL_189; case RightsManagementFailureCode.FeatureDisabled: break; case RightsManagementFailureCode.NotSupported: sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetNonEncoded(-1308596751), new object[] { WebReadyViewUtilities.GetOfficeDownloadAnchor(userContext.UserCulture) }); goto IL_308; case RightsManagementFailureCode.CorruptData: sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-987520932)); goto IL_308; default: if (failureCode != RightsManagementFailureCode.Success) { goto IL_19E; } goto IL_308; } break; } sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetNonEncoded(-1308596751), new object[] { WebReadyViewUtilities.GetOfficeDownloadAnchor(userContext.UserCulture) }); goto IL_308; } if (failureCode == RightsManagementFailureCode.UserRightNotGranted) { sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetNonEncoded(149546568), new object[] { WebReadyViewUtilities.GetOfficeDownloadAnchor(userContext.UserCulture) }); goto IL_308; } if (failureCode != RightsManagementFailureCode.PreLicenseAcquisitionFailed) { goto IL_19E; } IL_189: sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-492186842)); goto IL_308; IL_19E: sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(-624237727)); Exception exception = decryptionStatus.Exception; if (Globals.ShowDebugInformation && exception != null && exception.InnerException != null) { StringBuilder stringBuilder = new StringBuilder(); userContext.RenderThemeImage(stringBuilder, ThemeFileId.Expand, string.Empty, new object[0]); sanitizingStringBuilder.AppendFormat("<div onclick=\"document.getElementById('divDtls').style.display='';this.style.display='none';adjHght();\" style=\"cursor: pointer; color: #3165cd;\">" + stringBuilder.ToString() + " {0}</div><div id=\"divDtls\" style='display:none'>", new object[] { LocalizedStrings.GetNonEncoded(-610047827) }); string text = string.Empty; RightsManagementFailureCode failureCode2 = decryptionStatus.FailureCode; Exception innerException = exception.InnerException; if (innerException is RightsManagementException) { RightsManagementException ex = (RightsManagementException)innerException; text = ex.RmsUrl; } int num = 0; while (num < 10 && innerException.InnerException != null) { innerException = innerException.InnerException; num++; } sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(1633606253), new object[] { innerException.Message }); if (!string.IsNullOrEmpty(text)) { sanitizingStringBuilder.Append("<br>"); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(2115316283), new object[] { text }); } if (failureCode2 != RightsManagementFailureCode.Success) { sanitizingStringBuilder.Append("<br>"); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(970140031), new object[] { failureCode2 }); } sanitizingStringBuilder.Append("</div>"); } IL_308: return(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>()); }
private void HandleRightsManagementException(RightsManagementException e, OwaStoreObjectId messageId, string correlator) { RightsManagementFailureCode failureCode = e.FailureCode; if (failureCode <= RightsManagementFailureCode.PreLicenseAcquisitionFailed) { if (failureCode == RightsManagementFailureCode.UserRightNotGranted) { this.EnqueueLicensingError(messageId, SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1796455575, this.userCulture), new object[] { string.Empty }), correlator); return; } if (failureCode != RightsManagementFailureCode.PreLicenseAcquisitionFailed) { goto IL_15E; } } else { switch (failureCode) { case RightsManagementFailureCode.FailedToExtractTargetUriFromMex: case RightsManagementFailureCode.FailedToDownloadMexData: this.EnqueueLicensingError(messageId, SanitizedHtmlString.FromStringId(1314141112, this.userCulture), correlator); return; case RightsManagementFailureCode.GetServerInfoFailed: goto IL_15E; case RightsManagementFailureCode.InternalLicensingDisabled: this.EnqueueLicensingError(messageId, SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(1049269714, this.userCulture), new object[] { Utilities.GetOfficeDownloadAnchor(Microsoft.Exchange.Data.Storage.BodyFormat.TextHtml, this.userCulture) }), correlator); return; case RightsManagementFailureCode.ExternalLicensingDisabled: this.EnqueueLicensingError(messageId, SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(1397740097, this.userCulture), new object[] { Utilities.GetOfficeDownloadAnchor(Microsoft.Exchange.Data.Storage.BodyFormat.TextHtml, this.userCulture) }), correlator); return; default: switch (failureCode) { case RightsManagementFailureCode.ServerRightNotGranted: this.EnqueueLicensingError(messageId, SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(784482022, this.userCulture), new object[] { string.Empty }), correlator); return; case RightsManagementFailureCode.InvalidLicensee: break; default: goto IL_15E; } break; } } this.EnqueueLicensingError(messageId, SanitizedHtmlString.FromStringId(-1489754529, this.userCulture), correlator); return; IL_15E: SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>(LocalizedStrings.GetNonEncoded(360598592)); sanitizingStringBuilder.Append("<br>"); sanitizingStringBuilder.AppendFormat(LocalizedStrings.GetHtmlEncoded(1633606253, this.userCulture), new object[] { e.Message }); this.EnqueueLicensingError(messageId, sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), correlator); }