private static PolicyData LoadDefaultPolicySetting(IConfigurationSession scopedSession, ADUser user) { MobileMailboxPolicy[] array = scopedSession.Find <MobileMailboxPolicy>(scopedSession.GetOrgContainerId(), QueryScope.SubTree, MobilePolicySettingsHelper.mobileMailboxPolicyFilter, MobilePolicySettingsHelper.mobileMailboxPolicySortBy, 3); if (array != null && array.Length > 0) { return(MobilePolicySettingsHelper.CreatePolicyData(array[0])); } ExTraceGlobals.FrameworkTracer.TraceDebug <OrganizationId>(0L, "[MobilePolicySettingsHelper.LoadPolicySetting()] No default policy found for organization {0}", user.OrganizationId); return(null); }
private static PolicyData LoadPolicySetting(IConfigurationSession scopedSession, ADObjectId policyId) { MobileMailboxPolicy mobileMailboxPolicy = scopedSession.Read <MobileMailboxPolicy>(policyId); if (mobileMailboxPolicy != null) { return(MobilePolicySettingsHelper.CreatePolicyData(mobileMailboxPolicy)); } return(null); }
internal static string GetPolicyDataForUser(ADUser user, IBudget budget) { PolicyData policyData = MobilePolicySettingsHelper.GetPolicyData(user, budget); if (policyData != null) { bool flag; return(ProvisionCommandPhaseOne.BuildEASProvisionDoc(121, out flag, policyData)); } ExTraceGlobals.FrameworkTracer.TraceDebug <string>(0L, "[MobilePolicySettingsHelper.GetPolicyDataForUser()] No explicit or default policy found for user {0}", user.Alias); return(null); }
private static PolicyData GetDefaultPolicySetting(ADUser user, IBudget budget) { PolicyData result = null; try { result = MobilePolicySettingsHelper.LoadDefaultPolicySetting(MobilePolicySettingsHelper.CreateScopedADSession(user, budget), user); } catch (ADTransientException arg) { ExTraceGlobals.FrameworkTracer.TraceError <string, ADTransientException>(0L, "MobilePolicySettingsHelper.GetDefaultPolicySetting -- AD lookup returned transient error for user \"{0}\": {1}", user.Alias, arg); } return(result); }
private static PolicyData GetPolicyData(ADUser user, IBudget budget) { PolicyData policyData = null; if (user.ActiveSyncMailboxPolicy != null) { policyData = MobilePolicySettingsHelper.GetPolicySetting(user, budget); } if (policyData == null) { policyData = MobilePolicySettingsHelper.GetDefaultPolicySetting(user, budget); } return(policyData); }