コード例 #1
0
        protected void SetUserConfigPropertiesFromOrganizationConfig(UserConfigurationManager.IAggregationContext ctx, OrganizationId organizationId, OwaUserConfiguration configuration)
        {
            OwaOrgConfigData owaOrgConfigData = this.ReadAggregatedOrgConfigData(ctx, organizationId);

            configuration.MailTipsLargeAudienceThreshold  = owaOrgConfigData.MailTipsLargeAudienceThreshold;
            configuration.PublicComputersDetectionEnabled = owaOrgConfigData.PublicComputersDetectionEnabled;
        }
コード例 #2
0
        // Token: 0x060007D4 RID: 2004 RVA: 0x00019E0C File Offset: 0x0001800C
        public static bool IsPublicLogon(OrganizationId organizationId, HttpContext httpContext)
        {
            bool result;

            try
            {
                OwaOrgConfigData orgConfigTypeFromAd = UserContextUtilities.GetOrgConfigTypeFromAd(organizationId);
                result = (UserContextUtilities.IsPublicRequest(httpContext.Request) || (orgConfigTypeFromAd.PublicComputersDetectionEnabled && UserContextUtilities.IsPublicComputerSession(httpContext)));
            }
            catch (Exception ex)
            {
                ExTraceGlobals.CoreTracer.TraceError <string, string>(0L, "Failed to Get IsPublicLogon. Error: {0}. Stack: {1}.", ex.Message, ex.StackTrace);
                throw;
            }
            return(result);
        }
コード例 #3
0
        // Token: 0x060007D5 RID: 2005 RVA: 0x00019EF4 File Offset: 0x000180F4
        public static OwaOrgConfigData GetOrgConfigTypeFromAd(OrganizationId organizationId)
        {
            OwaOrgConfigData configuration = new OwaOrgConfigData
            {
                MailTipsLargeAudienceThreshold  = 25U,
                PublicComputersDetectionEnabled = false
            };

            ADNotificationAdapter.TryRunADOperation(delegate()
            {
                ADSessionSettings sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopesServiceOnly(organizationId);
                IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(false, ConsistencyMode.PartiallyConsistent, sessionSettings, 608, "GetOrgConfigTypeFromAd", "f:\\15.00.1497\\sources\\dev\\clients\\src\\Owa2\\Server\\Core\\common\\UserContextUtilities.cs");
                ADOrganizationConfig[] array = tenantOrTopologyConfigurationSession.Find <ADOrganizationConfig>(null, QueryScope.SubTree, null, null, 1);
                if (array != null && array.Length > 0)
                {
                    configuration.MailTipsLargeAudienceThreshold  = array[0].MailTipsLargeAudienceThreshold;
                    configuration.PublicComputersDetectionEnabled = array[0].PublicComputersDetectionEnabled;
                }
            }, 3);
            return(configuration);
        }