// 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();
        }
Example #2
0
        private void UpdateAppsLinks()
        {
            if (this.navBarPack.NavBarData.AppsLinks == null)
            {
                return;
            }
            List <NavBarLinkData> list = new List <NavBarLinkData>(this.navBarPack.NavBarData.AppsLinks.Length);

            NavBarLinkData[] appsLinks = this.navBarPack.NavBarData.AppsLinks;
            int i = 0;

            while (i < appsLinks.Length)
            {
                NavBarLinkData navBarLinkData = appsLinks[i];
                if ("ShellMarketplace".Equals(navBarLinkData.Id, StringComparison.Ordinal))
                {
                    ExchangeRunspaceConfiguration rbacConfiguration = RbacPrincipal.Current.RbacConfiguration;
                    if (rbacConfiguration.HasRoleOfType(RoleType.MyMarketplaceApps) && OfficeStoreAvailableQueryProcessor.IsOfficeStoreAvailable)
                    {
                        navBarLinkData.Url          = ExtensionData.GetClientExtensionMarketplaceUrl(CultureInfo.CurrentCulture.LCID, rbacConfiguration.HasRoleOfType(RoleType.MyReadWriteMailboxApps), this.showAdminFeature ? ExtensionUtility.UrlEncodedOfficeCallBackUrlForOrg : ExtensionUtility.UrlEncodedOfficeCallBackUrl, ExtensionUtility.DeploymentId, null);
                        navBarLinkData.TargetWindow = "_blank";
                        goto IL_DA;
                    }
                }
                else
                {
                    if ("ShellOfficeDotCom".Equals(navBarLinkData.Id, StringComparison.Ordinal))
                    {
                        navBarLinkData.TargetWindow = "_blank";
                        goto IL_DA;
                    }
                    goto IL_DA;
                }
IL_E1:
                i++;
                continue;
IL_DA:
                list.Add(navBarLinkData);
                goto IL_E1;
            }
            this.navBarPack.NavBarData.AppsLinks = list.ToArray();
        }
Example #3
0
 public override bool?TryIsInRole(ExchangeRunspaceConfiguration rbacConfiguration)
 {
     return(new bool?(rbacConfiguration.HasRoleOfType(this.RoleType)));
 }