Beispiel #1
0
        /// <summary>
        /// Bind the panel bar to the DataSource and cache the DataSource in the user's
        /// session to improve performance.
        /// </summary>
        private void BindPanelBarToDataSource()
        {
            NavBarData navbar   = new NavBarData();
            int        personID = CurrentPerson != null ? CurrentPerson.PersonID : -1;

            DataTable table = null;

            string navSessionkey = "CccevNavBar$" + RootPageIdSetting + "$";
            string authKey       = "CccevNavBarPersonID$";

            // don't get the table from the session if RefreshCache was requested
            if (Request.QueryString["refreshcache"] != null)
            {
                table = null;
            }
            else if (Session[navSessionkey] != null && Session[authKey] != null && (int)Session[authKey] == personID)
            {
                table = (DataTable)Session[navSessionkey];
            }
            // fetch a fresh table if the table has been set to null
            if (table == null)
            {
                table = navbar.GetNavBar_DT(Convert.ToInt32(RootPageIdSetting), personID);
                Session[navSessionkey] = table;
                // store the authenticated personID for the next check in order to ensure the user's
                // authentication has not changed since this DataSource was cached in their session.
                Session[authKey] = personID;
            }

            RadPanelbar2.DataSource = table;
            RadPanelbar2.DataBind();
        }
        // Token: 0x0600036E RID: 878 RVA: 0x0000D874 File Offset: 0x0000BA74
        protected void UpdateAppsLinks(NavBarData navBarData, AuthZClientInfo effectiveCaller)
        {
            string domain = string.Empty;

            if (navBarData.AppsLinks == null)
            {
                return;
            }
            if (effectiveCaller != null && !string.IsNullOrWhiteSpace(effectiveCaller.PrimarySmtpAddress))
            {
                SmtpAddress smtpAddress = new SmtpAddress(effectiveCaller.PrimarySmtpAddress);
                if (smtpAddress.IsValidAddress)
                {
                    domain = smtpAddress.Domain;
                }
            }
            string deploymentId        = ExtensionDataHelper.GetDeploymentId(domain);
            List <NavBarLinkData> list = new List <NavBarLinkData>(navBarData.AppsLinks.Length);

            NavBarLinkData[] appsLinks = navBarData.AppsLinks;
            int i = 0;

            while (i < appsLinks.Length)
            {
                NavBarLinkData navBarLinkData = appsLinks[i];
                if ("ShellMarketplace".Equals(navBarLinkData.Id, StringComparison.Ordinal))
                {
                    if (Globals.IsPreCheckinApp)
                    {
                        navBarLinkData.Url          = ExtensionData.GetClientExtensionMarketplaceUrl(this.culture.LCID, HttpContext.Current.Request, false, deploymentId, null);
                        navBarLinkData.TargetWindow = "_blank";
                        goto IL_169;
                    }
                    ExchangeRunspaceConfiguration exchangeRunspaceConfiguration = ExchangeRunspaceConfigurationCache.Singleton.Get(effectiveCaller, null, false);
                    if (exchangeRunspaceConfiguration.HasRoleOfType(RoleType.MyMarketplaceApps) && (string.IsNullOrWhiteSpace(ConfigurationManager.AppSettings["OfficeStoreUnavailable"]) || StringComparer.OrdinalIgnoreCase.Equals("false", ConfigurationManager.AppSettings["OfficeStoreUnavailable"])))
                    {
                        navBarLinkData.Url          = ExtensionData.GetClientExtensionMarketplaceUrl(this.culture.LCID, HttpContext.Current.Request, exchangeRunspaceConfiguration.HasRoleOfType(RoleType.MyReadWriteMailboxApps), deploymentId, null);
                        navBarLinkData.TargetWindow = "_blank";
                        goto IL_169;
                    }
                }
                else
                {
                    if ("ShellOfficeDotCom".Equals(navBarLinkData.Id, StringComparison.Ordinal))
                    {
                        navBarLinkData.TargetWindow = "_blank";
                        goto IL_169;
                    }
                    goto IL_169;
                }
IL_171:
                i++;
                continue;
IL_169:
                list.Add(navBarLinkData);
                goto IL_171;
            }
            navBarData.AppsLinks = list.ToArray();
        }
 // Token: 0x0600036D RID: 877 RVA: 0x0000D84B File Offset: 0x0000BA4B
 protected void ClearWorkloadLinks(NavBarData navBarData)
 {
     if (navBarData != null)
     {
         navBarData.WorkloadLinks   = null;
         navBarData.AdminLink       = null;
         navBarData.PartnerLink     = null;
         navBarData.UserDisplayName = null;
         navBarData.AppsLinks       = null;
     }
 }
        private BposNavBarInfo CreateBposNavBarInfo(NavBarInfo info, AuthZClientInfo effectiveCaller)
        {
            if (info == null)
            {
                return(null);
            }
            try
            {
                if (base.ShouldUpdateCache(info.Version))
                {
                    NavBarData navBarData = base.CreateNavBarData(info.NavBarDataJson);
                    base.UpdateCachedAssets(new BposNavBarInfo(info.Version, navBarData));
                }
            }
            catch (Exception)
            {
            }
            NavBarData navBarData2 = base.CreateNavBarData(info.NavBarDataJson);

            base.UpdateAppsLinks(navBarData2, effectiveCaller);
            return(new BposNavBarInfo(info.Version, navBarData2));
        }
        private BposShellInfo CreateBposShellInfo(ShellInfo info, AuthZClientInfo effectiveCaller)
        {
            if (info == null)
            {
                return(null);
            }
            try
            {
                if (base.ShouldUpdateCache(info.Version))
                {
                    NavBarData data = base.CreateNavBarData(info.NavBarDataJson);
                    base.UpdateCachedAssets(new BposShellInfo(info.Version, data, info.SuiteServiceProxyOriginAllowedList, info.SuiteServiceProxyScriptUrl));
                }
            }
            catch (Exception)
            {
            }
            NavBarData navBarData = base.CreateNavBarData(info.NavBarDataJson);

            base.UpdateAppsLinks(navBarData, effectiveCaller);
            return(new BposShellInfo(info.Version, navBarData, info.SuiteServiceProxyOriginAllowedList, info.SuiteServiceProxyScriptUrl));
        }
Beispiel #6
0
        public NavBarPack GetNavBarPack()
        {
            if (this.userPuid != null && !this.fallbackMode && (this.forceReload || !this.UseNavBarPackCache))
            {
                this.navBarPack = this.EndGetNavBarPack();
            }
            bool isMockObject = false;

            if (this.navBarPack == null && !this.forceReload)
            {
                this.navBarPack = this.GetMockNavBarPack();
                NavBarData navBarData = this.navBarPack.NavBarData;
                navBarData.UserDisplayName = this.rbacPrincipal.Name;
                if (NavigationUtil.ShouldRenderLogoutLink(this.rbacPrincipal))
                {
                    navBarData.SignOutLink = MockNavBar.CreateLink("signout_O365L", Strings.SignOff, "logoff.aspx?src=exch", null);
                }
                if (!this.isGallatin)
                {
                    navBarData.FooterCopyrightText = this.Office365Copyright;
                    navBarData.LegalLink           = MockNavBar.CreateLink("legal_O365L", Strings.Legal, "http://g.microsoftonline.com/1BX10en/20", "_blank");
                    navBarData.CommunityLink       = MockNavBar.CreateLink("community_O365L", Strings.Community, "http://g.microsoftonline.com/1BX10en/142", "_blank");
                    navBarData.PrivacyLink         = MockNavBar.CreateLink("privacy_O365L", Strings.Privacy, "http://g.microsoftonline.com/1BX10en/11", "_blank");
                }
                navBarData.HelpLink = MockNavBar.CreateLink("help_O365L", Strings.Help, null, null);
                isMockObject        = true;
                if (this.fallbackMode)
                {
                    this.navBarPack.IsFresh = true;
                }
            }
            if (this.navBarPack != null)
            {
                this.UpdateAppsLinks();
                this.AddCustomSubLinks(isMockObject);
            }
            return(this.navBarPack);
        }
Beispiel #7
0
 // Token: 0x0600051B RID: 1307 RVA: 0x0000E99E File Offset: 0x0000CB9E
 public IAsyncResult BeginDoNothing(NavBarData ignored0, AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginDoNothing(ignored0, callback, asyncState));
 }
Beispiel #8
0
 // Token: 0x0600051A RID: 1306 RVA: 0x0000E990 File Offset: 0x0000CB90
 public void DoNothing(NavBarData ignored0)
 {
     base.Channel.DoNothing(ignored0);
 }
 public BposShellInfo(string version, NavBarData data, string allowedProxyOrigins, string proxyScriptUrl) : base(version, data)
 {
     this.AllowedProxyOrigins = allowedProxyOrigins;
     this.ProxyScriptUrl      = proxyScriptUrl;
 }
Beispiel #10
0
 // Token: 0x06000529 RID: 1321 RVA: 0x0000EBAC File Offset: 0x0000CDAC
 public BposNavBarInfo(string version, NavBarData navBarData)
 {
     this.version    = version;
     this.navBarData = navBarData;
 }